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