应用程序支持文件夹在创建目录时没有iphone文件夹

时间:2013-06-22 02:22:41

标签: objective-c cordova

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

3 个答案:

答案 0 :(得分:1)

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

转到查找程序并按command + shift + G并粘贴您的网址并press Go

您无需启用隐藏文件。

答案 1 :(得分:0)

确保您没有搜索它,因为您将获得错误的应用程序文件夹,您必须转到“用户名”文件夹并使其显示隐藏文件,这将显示隐藏的库文件,以便您可以启动导航到那个地址...试试这个问题,不管怎么说都会尝试并进一步帮助。

答案 2 :(得分:0)

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