如何以编程方式访问iPhone Library文件夹 [英] How to access the iPhone Library folder programmatically

查看:160
本文介绍了如何以编程方式访问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?

提前致谢!

推荐答案

调用 NSLibraryDirectory 常量而不是 NSDocumentDirectory 常量> NSSearchPathForDirectoriesInDomains 。如果您真的计划编写允许用户管理文档的应用程序,您只需要担心这一点。

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.

这篇关于如何以编程方式访问iPhone Library文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆