[
https://issues.apache.org/jira/browse/CB-10706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15437684#comment-15437684
]
ASF GitHub Bot commented on CB-10706:
-------------------------------------
Github user cordova-qa commented on the issue:
https://github.com/apache/cordova-plugin-file/pull/193
Cordova CI Build has completed successfully.
**Commit** -
[Link](https://github.com/apache/cordova-plugin-file/pull/193/commits/a4df917e66d0c35cb3e11ca3257f54b8b7dd3eab)
**Dashboard** -
[Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40/)
| Builder Name | Console Output | Test Report | Device Logs |
| :---: | :---: | :---: | :---: |
| [Windows 8.1 Store](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-8.1-store/)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-8.1-store/console)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-8.1-store/testReport/)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-8.1-store/artifact/)
|
| [Windows 10 Store](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-10-store/)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-10-store/console)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-10-store/testReport/)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-10-store/artifact/)
|
| [Windows 8.1 Phone](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-8.1-phone/)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-8.1-phone/console)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-8.1-phone/testReport/)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=windows-8.1-phone/artifact/)
|
| [iOS](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=ios/)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=ios/console)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=ios/testReport/)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=ios/artifact/)
|
| [Android](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=android/)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=android/console)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=android/testReport/)
| [Link](
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/40//PLATFORM=android/artifact/)
|
> ms-appx:/// does not seem to work to copy folders/files from appx content...
> ----------------------------------------------------------------------------
>
> Key: CB-10706
> URL: https://issues.apache.org/jira/browse/CB-10706
> Project: Apache Cordova
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Plugin File, Windows
> Environment: Windows 10 Mobile, Phonegap 5.3.6, cordova-plugin-file
> 4.1.0 "File"
> Reporter: Fuchur84
> Labels: triaged, wfc
>
> This is the code I am trying to use to copy some files from the www-folder of
> the app to the storage of the smartphone.
> For Android and iOS everything is working, but for Windows 10 Mobile
> (neighter with "file://"... nor with "ms-appx:///"), I get
> "copy_data_from_local(0): Default-Folder ms-appx:///www/data/0 not available.
> 5"
> function copy_data_from_local(){
> if(window.system_type != 'windows'){ // this can hold windows, android or
> ios in it.
> // android or ios
> var default_folder = "file://" +
> (window.location.pathname).split('index.html').join('') + "data/0";
> var default_data_file = "file://" +
> (window.location.pathname).split('index.html').join('') + "data/data.txt";
> } else {
> // windows... file:// does not work here, so try it with ms-appx://
> var default_folder = "ms-appx:///www/data/0"; // THESE DO NOT WORK
> FOR WINDOWS... I AM NOT SURE WHY!
> var default_data_file = "ms-appx:///www/data/data.txt";
> }
> window.requestFileSystem = window.wrfs; // this is already available.
> // window.file_path is the folder of the app in app-data... this works.
> window.resolveLocalFileSystemURL(window.file_path, function(main_dir){
> window.resolveLocalFileSystemURL(default_folder, function(dir){
> dir.copyTo(main_dir, '0', function (new_dir){
> // default_data has been_copied: success
> window.resolveLocalFileSystemURL(default_data_file,
> function(data_file){
> console.log("copy_data_from_local(-2): Default-data_file
> is available.");
> // default_data-file is available
> data_file.copyTo(main_dir, 'data.txt', function (){
> // default_data-file has been_copied: success
> console.log("copy_data_from_local(1):
> Default-data_file has been copied.");
> get_file_contents(window.file_path + "data.txt",
> function() {
> update_data_now();
> }, function (error) {
> console.log("copy_data_from_local(3):
> Default-Data-File could not be copied. " + error.code);
> });
> }, function (error) {
> console.log("copy_data_from_local(4): Data could not be
> read. " + error.code);
> });
> }, function (error) {
> console.log("copy_data_from_local(4): Data could not be
> read. " + error.code);
> });
> },
> function (e) {
> console.log("copy_data_from_local(2): Default-directory could
> not be copied: " + e.code);
> });
> }, function (error) {
> // this seems to be firing on windows...
> console.log('copy_data_from_local(0): Default-Folder ' +
> default_folder + ' not available. ' + error.code);
> });
> }, function (error) {
> console.log('copy_data_from_local(-1): Parent-Folder ' +
> window.file_path + ' not available. ' + error.code);
> });
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]