New to Objective C. I have created a few directories which contain pdf files for an iPhone app. How can I delete a directory and its contents using NSFileManager?
Do I need to loop through and remove the contents first? Any code samples would be much appreciated.
Thanks in advance.
To start off, it would be wise to look through Apple’s
NSFileManagerdocumentation for the iPhone: NSFileManager Class Reference. Second, look atNSFileManager‘s-removeItemAtPath:error:method and its documentation. That’s what you’re looking for.