Skip to content

Commit

Permalink
doc: update mode type for fs open() functions
Browse files Browse the repository at this point in the history
This commit updates the documentation for fs.open(),
fs.openSync(), and fsPromises.open() to reflect the fact
that their mode option can be a string.

PR-URL: #31115
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
cjihrig authored and BridgeAR committed Jan 3, 2020
1 parent 53c6a1e commit 2313b9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2627,7 +2627,7 @@ changes:
* `path` {string|Buffer|URL}
* `flags` {string|number} See [support of file system `flags`][].
**Default:** `'r'`.
* `mode` {integer} **Default:** `0o666` (readable and writable)
* `mode` {string|integer} **Default:** `0o666` (readable and writable)
* `callback` {Function}
* `err` {Error}
* `fd` {integer}
Expand Down Expand Up @@ -2719,7 +2719,7 @@ changes:
* `path` {string|Buffer|URL}
* `flags` {string|number} **Default:** `'r'`.
See [support of file system `flags`][].
* `mode` {integer} **Default:** `0o666`
* `mode` {string|integer} **Default:** `0o666`
* Returns: {number}

Returns an integer representing the file descriptor.
Expand Down Expand Up @@ -4874,7 +4874,7 @@ changes:
* `path` {string|Buffer|URL}
* `flags` {string|number} See [support of file system `flags`][].
**Default:** `'r'`.
* `mode` {integer} **Default:** `0o666` (readable and writable)
* `mode` {string|integer} **Default:** `0o666` (readable and writable)
* Returns: {Promise}

Asynchronous file open that returns a `Promise` that, when resolved, yields a
Expand Down

0 comments on commit 2313b9e

Please sign in to comment.