From 0129a79d0a67fd6b62b6feb65c824a5dba8278e1 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Wed, 20 Jan 2021 18:40:51 +0100 Subject: [PATCH] fs: add explicit note about undefined path when recursive PR-URL: https://github.com/nodejs/node/pull/37010 Reviewed-By: Antoine du Hamel Reviewed-By: James M Snell --- doc/api/fs.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 1783220bf0b7e5..2f9dea37f3fd7f 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2632,6 +2632,8 @@ Asynchronously creates a directory. The callback is given a possible exception and, if `recursive` is `true`, the first directory path created, `(err, [path])`. +`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`