如何以编程方式访问 iPhone Library 文件夹
我听到 这篇 TUAW 文章指出 iPhone 应用程序应停止使用 Documents 文件夹来存储文件。相反,他们应该使用库文件夹。如何访问 Library 文件夹以将文件存储到其中?
提前致谢!
I heard in this TUAW Article that iPhone apps should stop using the Documents folder to store files. Instead they should use the library folder. How do you access the Library folder to store files to it?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
调用
NSSearchPathForDirectoriesInDomains
时,使用NSLibraryDirectory
常量而不是NSDocumentDirectory
常量。仅当您确实计划编写允许用户管理文档的应用程序时,您才需要担心这一点。Use the
NSLibraryDirectory
constant instead of theNSDocumentDirectory
constant when you callNSSearchPathForDirectoriesInDomains
. You would only have to worry about this if you actually do plan on writing an application that allows users to manage documents.