◐ Shell
clean mode source ↗

doc: document file mode caveats on Windows · nodejs/node@a5c5714

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