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