磁盘上的PFFile位置

时间:2014-06-27 06:07:12

标签: ios parse-platform

我已经在解析论坛和stackoverflow上的多个位置读取了PFFile内容在下载后保存到磁盘。他们在哪里救了?如何访问原始内容?

对于上下文,我使用AVFoundation并且它不会与NSDataNSInputStream一起玩。现在我从解析中获取文件并将NSData的内容写入临时目录。

1 个答案:

答案 0 :(得分:1)

未经测试尝试获取PFFile的缓存位置:

NSString *home = NSHomeDirectory();
NSString *library = [home stringByAppendingPathComponent:@"Library"];
NSString *docs = [library stringByAppendingPathComponent:@"Private Documents"];
NSString *parse = [docs stringByAppendingPathComponent:@"Parse"];
NSString *staging = [parse stringByAppendingPathComponent:@"PFFileStaging"];
NSString *file = [staging stringByAppendingPathComponent:
        [NSString stringWithFormat:@"%p_%@", pffileobj, pffileobj.name]];