1

我正在使用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);
      }
4

3 回答 3

1

最简单的解决方案就是复制 url

转到查找器并按command + shift + G并粘贴您的网址,然后press Go

您不需要启用隐藏文件。

于 2013-06-22T04:21:37.490 回答
0

确保你没有搜索它,因为你会得到错误的应用程序文件夹,你必须去你的“用户名”文件夹,让它显示隐藏文件,这将显示隐藏的库文件,这样你就可以开始导航了到那个地址...尝试那个和它的任何问题,我会尝试并提供进一步的帮助。

于 2013-06-22T03:06:52.303 回答
0

如果您不知道如何打开终端,请转到搜索放大镜右上角,单击它,然后在 finder 搜索栏中输入终端,然后按 Enter。将弹出一个终端窗口,在您复制此行“defaults write com.apple.Finder AppleShowAllFiles TRUE”后复制没有“”部分。现在右键单击该终端窗口上的“如果您有两个按钮鼠标”,然后从弹出的菜单中单击粘贴,现在按 Enter。现在最后一件事是关闭所有查找器窗口,因此复制此“killall Finder”(不带引号)并将其粘贴到终端并按 Enter 键...现在您的隐藏文件夹将出现在您的查找器窗口中,新的褪色隐藏库文件夹将位于mac/users/"无论你的用户名是什么"/

于 2013-06-22T04:10:56.767 回答