我正在使用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);
}
最简单的解决方案就是复制url
转到查找器,按command + shift + G
并粘贴您的url和press Go
您不需要启用隐藏文件。
确保你没有搜索它,因为你会得到错误的应用程序文件夹,你必须转到你的"用户名"文件夹,让它显示隐藏的文件,这将显示隐藏的库文件,这样你就可以开始导航到那个地址了。。。试着这样做,如果有任何问题,我会尽力提供进一步的帮助。
如果您不知道如何打开终端,请转到右上角的搜索放大镜,单击它,然后在查找器搜索栏中键入终端并按enter键。将弹出一个终端窗口,在您复制这行"defaults write com.apple.Finder AppleShowAllFiles TRUE"后,复制没有"部分的内容。现在右键点击终端窗口上的"如果你有一个两个按钮的鼠标",然后点击弹出菜单中的粘贴,现在按下回车键。现在最后一件事是关闭所有的查找器窗口,所以复制这个没有引号的"killall finder"并将其粘贴到终端中,然后按enter。。。现在,你的隐藏文件夹将出现在你的查找窗口中,新的褪色的隐藏库文件夹将位于mac/users/"whatever ur username is"/