Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Duplicate
-
3.5.0
-
None
-
Visual Studio Community 2015, Visual Studio Community 2015 Update 1 (RC)
Description
I've tried to use the plugin on Windows 8.1 and Windows 10 (UWP) and I get the same problems every time.
When the plugins are loaded, cordova.file/window.file is undefined , however I can overcome this issue with cordova.require function - which gives me the file object.
But even by doing so, I don't get the file paths which declared in the documentation such as: cordova.file.dataDirectoryand others.
That's how I'm overcoming this issue right now:
if (!window.file) {
window.file = cordova.require("cordova-plugin-file.FileProxy");
window.file.requestAllPaths(function (paths) {
for (var path in paths)
ready();
});
}
I got this code which runs fine on Android and IOS using angular:
$cordovaFile.createDir(window.file.dataDirectory, directoryName, false).then(function (data)
,
function (error)
);
this code fails on Windows platform - cause window.file is undefined
Attachments
Issue Links
- duplicates
-
CB-9887 Windows platform file plugin does not define standard cordova.file.* paths
- Closed