Skip to content

Create exists file/folder should throw error#133

Open
honghaoz wants to merge 1 commit intoJohnSundell:masterfrom
honghaoz:master
Open

Create exists file/folder should throw error#133
honghaoz wants to merge 1 commit intoJohnSundell:masterfrom
honghaoz:master

Conversation

@honghaoz
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant