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 a5c5714

Browse filesBrowse files
joyeecheungtargos
authored andcommitted
doc: document file mode caveats on Windows
- On Windows only the write permission (read-only bit) can be manipulated, and there is no distinction among owner, group or others. - mkdir on Windows does not support the mode argument. PR-URL: #20636 Fixes: #20498 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Backport-PR-URL: #21172
1 parent 2fe88d2 commit a5c5714
Copy full SHA for a5c5714

File tree

Expand file treeCollapse file tree

1 file changed

+8
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-3
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+8-3Lines changed: 8 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,10 @@ For example, the octal value `0o765` means:
10891089
* The group may read and write the file.
10901090
* Others may read and execute the file.
10911091

1092+
Caveats: on Windows only the write permission can be changed, and the
1093+
distinction among the permissions of group, owner or others is not
1094+
implemented.
1095+
10921096
## fs.chmodSync(path, mode)
10931097
<!-- YAML
10941098
added: v0.6.7
@@ -1987,7 +1991,7 @@ changes:
19871991
-->
19881992

19891993
* `path` {string|Buffer|URL}
1990-
* `mode` {integer} **Default:** `0o777`
1994+
* `mode` {integer} Not supported on Windows. **Default:** `0o777`.
19911995
* `callback` {Function}
19921996
* `err` {Error}
19931997

@@ -2007,7 +2011,7 @@ changes:
20072011
-->
20082012

20092013
* `path` {string|Buffer|URL}
2010-
* `mode` {integer} **Default:** `0o777`
2014+
* `mode` {integer} Not supported on Windows. **Default:** `0o777`.
20112015

20122016
Synchronously creates a directory. Returns `undefined`.
20132017
This is the synchronous version of [`fs.mkdir()`][].
@@ -2127,7 +2131,8 @@ changes:
21272131
Asynchronous file open. See open(2).
21282132

21292133
`mode` sets the file mode (permission and sticky bits), but only if the file was
2130-
created.
2134+
created. Note that on Windows only the write permission can be manipulated,
2135+
see [`fs.chmod()`][].
21312136

21322137
The callback gets two arguments `(err, fd)`.
21332138

0 commit comments

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