如何以编程方式访问 iPhone Library 文件夹

发布于 2024-08-31 02:01:16 字数 245 浏览 2 评论 0原文

我听到 这篇 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

趁年轻赶紧闹 2024-09-07 02:01:17

调用 NSSearchPathForDirectoriesInDomains 时,使用 NSLibraryDirectory 常量而不是 NSDocumentDirectory 常量。仅当您确实计划编写允许用户管理文档的应用程序时,您才需要担心这一点。

Use the NSLibraryDirectory constant instead of the NSDocumentDirectory constant when you call NSSearchPathForDirectoriesInDomains. You would only have to worry about this if you actually do plan on writing an application that allows users to manage documents.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文