Skip to content
Permalink
Browse files

doc: update mode type for fs open() functions

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 Dec 27, 2019
1 parent 53c6a1e commit 2313b9e33b706ba556ca1131e5389fa59ce42f12
Showing with 3 additions and 3 deletions.
  1. +3 −3 doc/api/fs.md
@@ -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}
@@ -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.
@@ -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

0 comments on commit 2313b9e

Please sign in to comment.
You can’t perform that action at this time.