objective c,checking file exist at path

前端 未结 3 808
后悔当初
后悔当初 2020-12-23 13:41

I have created a screen using Objective-C in an iPhone project. In that, there are 2 buttons (say A and B). On the click of button A, one xml file will be created in a folde

3条回答
  •  臣服心动
    2020-12-23 14:01

    Can you Please Check NSFileManager.

    NSFileManager *fileManager = [NSFileManager defaultManager];
    
    NSString *pathForFile;
    
    if ([fileManager fileExistsAtPath:pathForFile]){ 
    
    }
    

提交回复
热议问题