Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's the difference between NSCachesDirectory and NSDownloadsDirectory in iOS?

Tags:

ios

iphone

ipad

I want to save downloaded magazines to one directory in my iOS app. It seems NSCachesDirectory and NSDownloadsDirectory are suitable. I don't know the difference between them and which one is suitable for downloading magazines. Any suggestions are appreciated.

like image 820
chancyWu Avatar asked Feb 26 '13 07:02

chancyWu


1 Answers

NSCachesDirectory can be deleted in cases of low memory

If you don't want your files to be deleted you have to store them in the Documents directory, but add "do not backup" if you don't want your files to be backed by iTunes, iCloud etc..

Please look at the apple's File System Programming Guide or File System Basics

like image 146
βhargavḯ Avatar answered Oct 16 '22 21:10

βhargavḯ