// 取得沙盒目录
NSString *localPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
// 要检查的文件目录
NSString *filePath = [localPath  stringByAppendingPathComponent:@"abc.doc"];
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:filePath]) {
    NSLog(@"文件abc.doc存在");
}
else {
    NSLog(@"文件abc.doc不存在");
}

 

相关文章:

  • 2021-05-30
  • 2022-12-23
  • 2021-12-01
  • 2022-02-15
  • 2022-12-23
  • 2022-02-20
  • 2022-02-02
  • 2022-12-23
猜你喜欢
  • 2021-10-29
  • 2021-10-04
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
相关资源
相似解决方案