Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Duplicate
-
2.0.0
-
None
-
None
-
Windows Phone 8 emulator
Description
I have some code that tries to list all of the files in www/json. It works correctly on iOS and Android but fails on Windows Phone 8.1.
The code is pretty straight forward:
window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+'/www/json',
function(dirEntry){
var directoryReader = dirEntry.createReader();
directoryReader.readEntries(
function(entries){
ups_json_file_count = entries.length;
var i;
for (i=0; i < ups_json_file_count; i++)
},
function()
);
},
function(error)
);
After doing some digging I found that cordova.file is coming up as undefined. The above code is being called inside of the onDeviceReady function.
cordova-plugin-file 2.0.0 "File"
cordova-plugin-file-transfer 1.0.0 "File Transfer"
Attachments
Issue Links
- duplicates
-
CB-9887 Windows platform file plugin does not define standard cordova.file.* paths
- Closed
There is a workaround for this on stack overflow.
http://stackoverflow.com/questions/26910891/cordova-file-is-undefined-for-windows-wp8