I am trying to access the file system in an iOS cordova application, but when using the method, getDirectoryit always returns error code 3 (ABORT_ERR).
I am using the following code:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
function onFileSystemSuccess(fileSystem) {
console.log(fileSystem.name);
dataDir = fileSystem.root.getDirectory("ozzie", {create: true}, getDir, fail);
}
function getDir(dir) {
console.log("successfull got directory", dir);
}
function fail(error) {
console.log("error", error.code);
}
I believe me fileSystem.name("persistent"), but never get a directory. This always returns error.code = 3, which is in accordance with the ABORT_ERR phone records documentation.
Has anyone had this behavior before?
Ozzie source
share