diff --git a/doc/api/fs.md b/doc/api/fs.md index bcf4a9f10db8cf..cf83d0de7cc6e0 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2207,6 +2207,15 @@ fs.mkdir('/tmp/a/apple', { recursive: true }, (err) => { }); ``` +On Windows, using `fs.mkdir()` on the root directory even with recursion will +result in an error: + +```js +fs.mkdir('/', { recursive: true }, (err) => { + // => [Error: EPERM: operation not permitted, mkdir 'C:\'] +}); +``` + See also: mkdir(2). ## fs.mkdirSync(path[, options])