我有一個使用文件插件的應用程序,在應用程序內一切正常,但我使用的文件沒有出現在文件資源管理器中。Cordova文件沒有創建目錄
我的班級:
function FileCordova() {
this.createDir = function(dirName, callback) {
App.db.fsSetup();
if (App.db.hasFS()) {
window.requestFileSystem(window.PERSISTENT, 0, function (f) {
f.root.getDirectory(dirName, {create: true}, function (d) {
typeof callback === 'function' && callback(d.name, d.fullPath);
},
function(error, err2){
console.log(error);
});
}, function(error,err2){
console.log(error);
});
} else {
typeof callback === 'function' && callback();
}
};
}
裏面的應用程序去文件出現,但我不能在根目錄中找到。
謝謝!有用! –