我已经在解析论坛和stackoverflow上的多个位置读取了PFFile
内容在下载后保存到磁盘。他们在哪里救了?如何访问原始内容?
对于上下文,我使用AVFoundation
并且它不会与NSData
或NSInputStream
一起玩。现在我从解析中获取文件并将NSData
的内容写入临时目录。
答案 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]];