Skip to content

Commit 5948ff4

Browse files
cjihrigtargos
authored andcommitted
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent a5f1434 commit 5948ff4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/fs.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2601,7 +2601,7 @@ changes:
26012601
* `path` {string|Buffer|URL}
26022602
* `flags` {string|number} See [support of file system `flags`][].
26032603
**Default:** `'r'`.
2604-
* `mode` {integer} **Default:** `0o666` (readable and writable)
2604+
* `mode` {string|integer} **Default:** `0o666` (readable and writable)
26052605
* `callback` {Function}
26062606
* `err` {Error}
26072607
* `fd` {integer}
@@ -2693,7 +2693,7 @@ changes:
26932693
* `path` {string|Buffer|URL}
26942694
* `flags` {string|number} **Default:** `'r'`.
26952695
See [support of file system `flags`][].
2696-
* `mode` {integer} **Default:** `0o666`
2696+
* `mode` {string|integer} **Default:** `0o666`
26972697
* Returns: {number}
26982698

26992699
Returns an integer representing the file descriptor.
@@ -4848,7 +4848,7 @@ changes:
48484848
* `path` {string|Buffer|URL}
48494849
* `flags` {string|number} See [support of file system `flags`][].
48504850
**Default:** `'r'`.
4851-
* `mode` {integer} **Default:** `0o666` (readable and writable)
4851+
* `mode` {string|integer} **Default:** `0o666` (readable and writable)
48524852
* Returns: {Promise}
48534853

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

0 commit comments

Comments
 (0)