【发布时间】:2014-02-17 11:08:18
【问题描述】:
我正在尝试访问 Cordova iOS 应用程序中的文件系统,但当我使用 getDirectory 方法时,它总是返回错误代码 3 (ABORT_ERR)。
我正在使用以下代码:
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);
}
返回fileSystem.name(“持久”),但它永远不会获取目录。这总是返回 error.code = 3,根据 phonegap 文档,它是 ABORT_ERR。
以前有人有过这种行为吗?
【问题讨论】:
-
遇到同样的错误,你解决了吗?