Ambiguous Error Codes from FileManager.createDirectory When Intermediate Path Is a Regular File
On Darwin and swift-corelibs-foundation, FileManager.createDirectory(atPath:withIntermediateDirectories:attributes:) fails when an intermediate path component already exists as a regular file, even if withIntermediateDirectories is true . Apple's documentation does not fully specify which NSError code should be returned for this condition, leaving developers