summaryrefslogtreecommitdiff
path: root/doc/api/fs.md
diff options
context:
space:
mode:
authorGaelan <gbs@canishe.com>2019-04-30 16:12:46 -0700
committerRich Trott <rtrott@gmail.com>2019-05-19 09:35:26 -0700
commit13d2df530b613f5f41db3e9680fa85d55bea0f1e (patch)
tree41be119d049b9fab7a37163ad2d247f6bee89b8d /doc/api/fs.md
parent5112b3d9a6645b83b90b559cb388fa29ee61eb99 (diff)
downloadandroid-node-v8-13d2df530b613f5f41db3e9680fa85d55bea0f1e.tar.gz
android-node-v8-13d2df530b613f5f41db3e9680fa85d55bea0f1e.tar.bz2
android-node-v8-13d2df530b613f5f41db3e9680fa85d55bea0f1e.zip
doc: clarify behavior of fs.mkdir
PR-URL: https://github.com/nodejs/node/pull/27505 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/fs.md')
-rw-r--r--doc/api/fs.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/api/fs.md b/doc/api/fs.md
index 9e3b0df9a4..3b3c6efd58 100644
--- a/doc/api/fs.md
+++ b/doc/api/fs.md
@@ -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.
@@ -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