Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f8dcbba

Browse filesBrowse files
coreyfarrelladdaleax
authored andcommitted
doc: fs.mkdir('/') throws EPERM on Windows
Fixes: #25110 PR-URL: #25340 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Coe <bencoe@gmail.com>
1 parent 1d49408 commit f8dcbba
Copy full SHA for f8dcbba

File tree

Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+9Lines changed: 9 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2212,6 +2212,15 @@ fs.mkdir('/tmp/a/apple', { recursive: true }, (err) => {
22122212
});
22132213
```
22142214

2215+
On Windows, using `fs.mkdir()` on the root directory even with recursion will
2216+
result in an error:
2217+
2218+
```js
2219+
fs.mkdir('/', { recursive: true }, (err) => {
2220+
// => [Error: EPERM: operation not permitted, mkdir 'C:\']
2221+
});
2222+
```
2223+
22152224
See also: mkdir(2).
22162225

22172226
## fs.mkdirSync(path[, options])

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.