NSFileManager removeItemAtURL
performs only recursive deletion. There is no special treatment for non-empty directories.
How can I remove only empty directories by testing the condition beforehand? There is contentsOfDirectoryAtPath
to get a list of files, which may be empty, but that's overkill.
Alternately, is there a function to remove it only if empty, like good ol' rmdir
? Ah, I could just call that…