Files icon indicating copy to clipboard operation
Files copied to clipboard

Create exists file/folder should throw error

Open honghaoz opened this issue 3 years ago • 0 comments

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.

honghaoz avatar Sep 25 '22 00:09 honghaoz