From 08064f3af3558cc88e85f7bce5b721d91ca10c46 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 27 Dec 2019 10:09:35 -0500 Subject: [PATCH 1/5] doc: update parameter type for fsPromises.chmod() This was overlooked in https://github.com/nodejs/node/pull/31085. --- doc/api/fs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index ee4d9750d9326a..9c7c48ba4371ac 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -4680,7 +4680,7 @@ added: v10.0.0 --> * `path` {string|Buffer|URL} -* `mode` {integer} +* `mode` {string|integer} * Returns: {Promise} Changes the permissions of a file then resolves the `Promise` with no From 0ab0c1a105b92c81a2513cc58911f437aa5946f7 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 27 Dec 2019 10:12:35 -0500 Subject: [PATCH 2/5] doc: update mode type for fchmod() functions fs.fchmod() and fs.fchmodSync() both support strings as their mode argument. This commit updates the documentation to reflect this. --- doc/api/fs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 9c7c48ba4371ac..5c380a7022ebb3 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1979,7 +1979,7 @@ changes: --> * `fd` {integer} -* `mode` {integer} +* `mode` {string|integer} * `callback` {Function} * `err` {Error} @@ -1992,7 +1992,7 @@ added: v0.4.7 --> * `fd` {integer} -* `mode` {integer} +* `mode` {string|integer} Synchronous fchmod(2). Returns `undefined`. From 7ef54380b723c87907a559f9cc50c7dbb398fb14 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 27 Dec 2019 10:16:58 -0500 Subject: [PATCH 3/5] 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. --- doc/api/fs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 5c380a7022ebb3..646d08a113383f 100644 --- a/doc/api/fs.md +++ b/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 From 71443e267979e2b914a9e93132be7aae92ec8bdb Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 27 Dec 2019 10:18:42 -0500 Subject: [PATCH 4/5] doc: update mode type for process.umask() This commit updates the documentation for process.umask() to reflect the fact that the mode option can be a string. --- doc/api/process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/process.md b/doc/api/process.md index c9f514d5d58336..f5d81878cfe4d3 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -2297,7 +2297,7 @@ flag's behavior. added: v0.1.19 --> -* `mask` {number} +* `mask` {string|integer} The `process.umask()` method sets or returns the Node.js process's file mode creation mask. Child processes inherit the mask from the parent process. Invoked From b30ae02c4d657063d26b023c55fd3dc26a81263f Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 27 Dec 2019 10:20:31 -0500 Subject: [PATCH 5/5] doc: update mode type for mkdir() functions This commit updates the documentation for fs.mkdir(), fs.mkdirSync(), and fsPromises.mkdir() to reflect the fact that their mode option can be a string. --- doc/api/fs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 646d08a113383f..4f2535d6c3ba7a 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2459,7 +2459,7 @@ changes: * `path` {string|Buffer|URL} * `options` {Object|integer} * `recursive` {boolean} **Default:** `false` - * `mode` {integer} Not supported on Windows. **Default:** `0o777`. + * `mode` {string|integer} Not supported on Windows. **Default:** `0o777`. * `callback` {Function} * `err` {Error} @@ -2507,7 +2507,7 @@ changes: * `path` {string|Buffer|URL} * `options` {Object|integer} * `recursive` {boolean} **Default:** `false` - * `mode` {integer} Not supported on Windows. **Default:** `0o777`. + * `mode` {string|integer} Not supported on Windows. **Default:** `0o777`. Synchronously creates a directory. Returns `undefined`. This is the synchronous version of [`fs.mkdir()`][]. @@ -4819,7 +4819,7 @@ added: v10.0.0 * `path` {string|Buffer|URL} * `options` {Object|integer} * `recursive` {boolean} **Default:** `false` - * `mode` {integer} Not supported on Windows. **Default:** `0o777`. + * `mode` {string|integer} Not supported on Windows. **Default:** `0o777`. * Returns: {Promise} Asynchronously creates a directory then resolves the `Promise` with no