Given, a file of path [[self documentsDirectory] stringByAppendingPathComponent:@"myFiles/aFile.txt"]
, How do I delete a file in my apps documents directory?
Locate the item you want to delete, highlight it by left-clicking the file or folder with your mouse once, and press the Delete key. You can browse the location of the file or folder using My Computer or Windows Explorer.
Select the item in your file explorer. Then, tap the trash button or press the three-dot menu and choose Delete. Confirm you understand deletion can't be undone and tap Delete again. This is how you should delete your files on Android.
To delete a file, select it and tap the Delete button . If you delete files from the iCloud Drive folder on one device, they are automatically deleted on your other devices, too.
Answer: A: Answer: A: Files stored in the Files app WILL be deleted IF the Files app is deleted! If you have ANY important data stored in folders in the Files App, you DO NOT want to delete the Files app!
NSFileManager is a very handy tool:
[[NSFileManager defaultManager] removeItemAtPath: pathToFile error: &error];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With