Hi There, 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
A:
NSFileManager handles all the filesystem operations, including file deletion.
August
2009-02-12 11:23:37
+2
A:
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.
Roger Nolan
2009-02-12 12:03:15