我想将下载的杂志保存到我的 iOS 应用程序中的一个目录中。它似乎NSCachesDirectory
and NSDownloadsDirectory
是合适的。我不知道它们之间有什么区别,以及哪一种适合下载杂志。任何建议表示赞赏。
内存不足时可以删除 NSCachesDirectory
如果你不希望你的文件被删除,你必须将它们存储在 Documents 目录中,但如果你不希望你的文件由 iTunes、iCloud 等支持,请添加“不备份”。
请看苹果的文件系统编程指南 http://developer.apple.com/library/ios/#Documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW2 or 文件系统基础知识 https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW1
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)