Skip to content

Commit 5cd21cf

Browse files
A
doc: add File modes cross-references in fs methods Adds links to the File modes section from fsPromises.open(), fsPromises.mkdir(), and fs.mkdir() to improve discoverability of file permission documentation.
1 parent 71f5b1c commit 5cd21cf

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/api/fs.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,8 @@ added: v10.0.0
12311231
* `path` {string|Buffer|URL}
12321232
* `options` {Object|integer}
12331233
* `recursive` {boolean} **Default:** `false`
1234-
* `mode` {string|integer} Not supported on Windows. **Default:** `0o777`.
1234+
* `mode` {string|integer} Not supported on Windows. See [File modes][]
1235+
for more details. **Default:** `0o777`.
12351236
* Returns: {Promise} Upon success, fulfills with `undefined` if `recursive`
12361237
is `false`, or the first directory path created if `recursive` is `true`.
12371238
@@ -1366,7 +1367,8 @@ changes:
13661367
* `flags` {string|number} See [support of file system `flags`][].
13671368
**Default:** `'r'`.
13681369
* `mode` {string|integer} Sets the file mode (permission and sticky bits)
1369-
if the file is created. **Default:** `0o666` (readable and writable)
1370+
if the file is created. See [File modes][] for more details.
1371+
**Default:** `0o666` (readable and writable)
13701372
* Returns: {Promise} Fulfills with a {FileHandle} object.
13711373
13721374
Opens a {FileHandle}.
@@ -3454,7 +3456,8 @@ changes:
34543456
* `path` {string|Buffer|URL}
34553457
* `options` {Object|integer}
34563458
* `recursive` {boolean} **Default:** `false`
3457-
* `mode` {string|integer} Not supported on Windows. **Default:** `0o777`.
3459+
* `mode` {string|integer} Not supported on Windows. See [File modes][]
3460+
for more details. **Default:** `0o777`.
34583461
* `callback` {Function}
34593462
* `err` {Error}
34603463
* `path` {string|undefined} Present only if a directory is created with
@@ -8714,6 +8717,7 @@ the file contents.
87148717
[`filehandle.writeFile()`]: #filehandlewritefiledata-options
87158718
[`fs.access()`]: #fsaccesspath-mode-callback
87168719
[`fs.accessSync()`]: #fsaccesssyncpath-mode
8720+
[File modes]: #file-modes
87178721
[`fs.chmod()`]: #fschmodpath-mode-callback
87188722
[`fs.chown()`]: #fschownpath-uid-gid-callback
87198723
[`fs.copyFile()`]: #fscopyfilesrc-dest-mode-callback

0 commit comments

Comments
 (0)