mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
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. PR-URL: https://github.com/nodejs/node/pull/60286 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
This commit is contained in:
parent
37d9cfcd3a
commit
7674f989aa
@ -1231,7 +1231,8 @@ added: v10.0.0
|
||||
* `path` {string|Buffer|URL}
|
||||
* `options` {Object|integer}
|
||||
* `recursive` {boolean} **Default:** `false`
|
||||
* `mode` {string|integer} Not supported on Windows. **Default:** `0o777`.
|
||||
* `mode` {string|integer} Not supported on Windows. See [File modes][]
|
||||
for more details. **Default:** `0o777`.
|
||||
* Returns: {Promise} Upon success, fulfills with `undefined` if `recursive`
|
||||
is `false`, or the first directory path created if `recursive` is `true`.
|
||||
|
||||
@ -1366,7 +1367,8 @@ changes:
|
||||
* `flags` {string|number} See [support of file system `flags`][].
|
||||
**Default:** `'r'`.
|
||||
* `mode` {string|integer} Sets the file mode (permission and sticky bits)
|
||||
if the file is created. **Default:** `0o666` (readable and writable)
|
||||
if the file is created. See [File modes][] for more details.
|
||||
**Default:** `0o666` (readable and writable)
|
||||
* Returns: {Promise} Fulfills with a {FileHandle} object.
|
||||
|
||||
Opens a {FileHandle}.
|
||||
@ -3454,7 +3456,8 @@ changes:
|
||||
* `path` {string|Buffer|URL}
|
||||
* `options` {Object|integer}
|
||||
* `recursive` {boolean} **Default:** `false`
|
||||
* `mode` {string|integer} Not supported on Windows. **Default:** `0o777`.
|
||||
* `mode` {string|integer} Not supported on Windows. See [File modes][]
|
||||
for more details. **Default:** `0o777`.
|
||||
* `callback` {Function}
|
||||
* `err` {Error}
|
||||
* `path` {string|undefined} Present only if a directory is created with
|
||||
@ -8697,6 +8700,7 @@ the file contents.
|
||||
[Common System Errors]: errors.md#common-system-errors
|
||||
[FS constants]: #fs-constants
|
||||
[File access constants]: #file-access-constants
|
||||
[File modes]: #file-modes
|
||||
[MDN-Date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
|
||||
[MDN-Number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type
|
||||
[MSDN-Rel-Path]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#fully-qualified-vs-relative-paths
|
||||
|
||||
Loading…
Reference in New Issue
Block a user