4
我的iPhone应用程序正在将照片保存到文档文件夹中。我想在使用后删除所有这些文件格式的文件夹。我知道如何在时间使用路径从iphone文档文件夹中删除多个文件?
if ([fileMgr removeItemAtPath:filePath error:&error] != YES)
NSLog(@"Unable to delete file: %@", [error localizedDescription]);
删除一个文件,但我想删除所有文件中一气呵成。我所有的文件都是.png格式,我尝试了* .png但不工作。
感谢您的帮助,我只是在条件和工作后添加以下内容。 NSString * path = [documentsDirectory stringByAppendingPathComponent:item]; [fileMgr removeItemAtPath:path error:&error]; –
啊,当然。对不起拉维,我错过了。 – sidyll