From 6e74bb3cf62c3daa678e9c5060d8c7cf2db8eb5c Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Wed, 20 Jan 2021 18:40:51 +0100 Subject: [PATCH 1/2] fs.mkdir: Add explicit note about undefined path when recursive --- doc/api/fs.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 0082e013d7889a..3c62f658f1c9fe 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2642,6 +2642,7 @@ Asynchronously creates a directory. The callback is given a possible exception and, if `recursive` is `true`, the first directory path created, `(err, [path])`. +Note that `path` can still be `undefined` when `recursive` is `true`, if no directory was created. The optional `options` argument can be an integer specifying `mode` (permission and sticky bits), or an object with a `mode` property and a `recursive` From 7b5b4f9bb608079246d05e194537adf3385da131 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Thu, 21 Jan 2021 10:45:18 +0100 Subject: [PATCH 2/2] Update doc/api/fs.md Co-authored-by: Antoine du Hamel --- doc/api/fs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 3c62f658f1c9fe..a0a47b14398dd7 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2642,7 +2642,8 @@ Asynchronously creates a directory. The callback is given a possible exception and, if `recursive` is `true`, the first directory path created, `(err, [path])`. -Note that `path` can still be `undefined` when `recursive` is `true`, if no directory was created. +`path` can still be `undefined` when `recursive` is `true`, if no directory was +created. The optional `options` argument can be an integer specifying `mode` (permission and sticky bits), or an object with a `mode` property and a `recursive`