查看指定路径文件是否存在
作者:
梦想家家家 | 来源:发表于
2017-09-14 12:56 被阅读13次NSString*urlStr =self.dic[@"videoUrl"];
//检查文件是否已经下载
NSString*cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory,NSUserDomainMask,YES)lastObject];
NSString*path = [cachesPathstringByAppendingPathComponent:self.dic[@"fileName"]];
NSURL*fileUrl = [NSURLfileURLWithPath:path];
NSFileManager*fileManager = [NSFileManagerdefaultManager];
//
if([fileManagerfileExistsAtPath:path]) {
//文件存在
[self.delegatevideoCell:selfisDownloadedWithPath:fileUrl];
return;
}
本文标题:查看指定路径文件是否存在
本文链接:https://www.haomeiwen.com/subject/qqcdsxtx.html
网友评论