Reputation: 6607
What would be the quickest way to delete the contents in the documents directory. I have a list of the contents loaded into an NSArray but I'm not sure of the objective c on how to delete safely. I've googled for a solution but cant seem to find anything. Thanks for your help. PS, can you recommend a good book for Begginners on iphone programming Tony
Upvotes: 0
Views: 1018
Reputation: 17170
Specifically, you want NSFileManager's -(BOOL)removeItemAtPath:(NSString *)path error:(NSError **)error
this is documented in the SDK.
There aren't many iPhone programming books but I think Dave Mark and Jeff LaMarche's Beginning iPhone Development: Exploring the iPhone SDK is one of the best introductions.
Upvotes: 2
Reputation: 12177
NSFileManager handles all the filesystem operations, including file deletion.
Upvotes: 0