我正试图在我的iPad应用程序的Caches文件夹中存储一些东西.
NSArray* cachePathArray = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString* cachePath = [cachePathArray lastObject];
Run Code Online (Sandbox Code Playgroud)
当我打印出返回的文件路径时,我得到:
/ Users/Gela/Library/Application Support/iPhone Simulator/5.0/Applications/3FF7EB1A-49A9-4B13-ADC4-DF0662BA724B/Library/Caches
但是,当我导航到硬盘驱动器上的该文件夹时,"缓存"不是文件夹,而是模糊的"文档"文件.
任何想法为什么它不是一个文件夹以及如何写入我的缓存?