Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention fs.mkdir's behavior with existing directories in docs. #27505

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,9 @@ are given to the completion callback.

The optional `options` argument can be an integer specifying mode (permission
and sticky bits), or an object with a `mode` property and a `recursive`
property indicating whether parent folders should be created.
property indicating whether parent folders should be created. Calling
`fs.mkdir()` when `path` is a directory that exists results in an error only
when `recursive` is false.

```js
// Creates /tmp/a/apple, regardless of whether `/tmp` and /tmp/a exist.
Expand Down Expand Up @@ -4288,7 +4290,9 @@ arguments upon success.

The optional `options` argument can be an integer specifying mode (permission
and sticky bits), or an object with a `mode` property and a `recursive`
property indicating whether parent folders should be created.
property indicating whether parent folders should be created. Calling
`fsPromises.mkdir()` when `path` is a directory that exists results in a
rejection only when `recursive` is false.

### fsPromises.mkdtemp(prefix[, options])
<!-- YAML
Expand Down