首页 > 移动平台 > 详细

ios判断程序文件夹下是否存在指定文件

时间:2014-04-02 08:50:36      阅读:352      评论:0      收藏:0      [点我收藏+]
NSString *fileName=@"04.jpg";
NSArray *DocumentPath= NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *filepath=[[NSString alloc] initWithString:[NSString stringWithFormat:@"%@/%@",DocumentPath[0],fileName]];
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:filepath]) {
    NSLog(@"file is exists");
} else{
    NSLog(@"file is not exists");
};

  

ios判断程序文件夹下是否存在指定文件,布布扣,bubuko.com

ios判断程序文件夹下是否存在指定文件

原文:http://www.cnblogs.com/ashamp/p/3639163.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!