To match the documentation of createSubfolder and createFile methods on
This method throws an error if a folder already exists at the given path.
This method throws an error if a file already exists at the given path.
It should throw error if file/folder exits.
The reason is when withIntermediateDirectories is set to true for createDirectory(atPath:withIntermediateDirectories:attributes:), the FileManager doesn't throw error if path exists.
To match the documentation of
createSubfolder
andcreateFile
methods onIt should throw error if file/folder exits.
The reason is when
withIntermediateDirectories
is set totrue
forcreateDirectory(atPath:withIntermediateDirectories:attributes:)
, the FileManager doesn't throw error if path exists.