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

时间:2014-04-02 08:50:36   收藏:0   阅读:354
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

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!