我正在使用Phonegap
. 我在使用代码时取得了成功。但我需要检查我的文件夹是在哪里创建的。我找到了他们告诉这些链接的链接。
/Users/UserName/Library/Application Support/iPhone Simulator/4.3.2/Applications
/Users/loginname/Library/Application Support/iPhone Simulator/6.1/Applications/YOUR_APP/Documents
但是我在应用程序支持中没有任何 iPhone 模拟器文件夹?我会在哪里搜索?
我有 Xcode 4.5 版本
如何使用相同的代码查找 android 目录。我可以在 Ios 中找到
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, onFileSystemFail);
}
function onFileSystemSuccess(fileSystem) {
console.log(fileSystem.name);
var directoryEntry = fileSystem.root;
directoryEntry.getDirectory("newDir", {create: true, exclusive: false}, onDirectorySuccess, onDirectoryFail)
}
function onDirectorySuccess(parent) {
//alert("onSuccess")
console.log(parent);
// alert(parent+"Directory");
}
function onDirectoryFail(error) {
alert("Unable to create new directory: " + error.code);
}
function onFileSystemFail(evt) {
console.log(evt.target.error.code);
alert(evt.target.error.code);
}