I need to make sure that my files are written atomically.
Is the same true of folders? Is it impossible that they can be partially written?
I've looked through the documentation of createDirectory(at:withIntermediateDirectories:attributes:)
and I cannot see if the method is atomic, or whether there is any possibility that the operation could fail.
Can createDirectory(at:withIntermediateDirectories:attributes:)
fail part way through?