How to remove a directory and its contents using NSFileManager

后端 未结 2 1240
后悔当初
后悔当初 2021-02-03 19:16

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 n

2条回答
  •  再見小時候
    2021-02-03 20:00

    To start off, it would be wise to look through Apple's NSFileManager documentation for the iPhone: NSFileManager Class Reference. Second, look at NSFileManager's -removeItemAtPath:error: method and its documentation. That's what you're looking for.

提交回复
热议问题