From 966c473e608c8e6036586cdf3ad4e5d270118489 Mon Sep 17 00:00:00 2001 From: RamdohokarAngha <91063774+RamdohokarAngha@users.noreply.github.com> Date: Mon, 24 Jul 2023 17:06:51 +0530 Subject: [PATCH 1/2] doc: fix description of `fs.readdir` `recursive` option --- doc/api/fs.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 76f6432212654f..f31d5d43d9173b 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1322,7 +1322,8 @@ changes: * `options` {string|Object} * `encoding` {string} **Default:** `'utf8'` * `withFileTypes` {boolean} **Default:** `false` - * `recursive` {boolean} **Default:** `false` + * `recursive` {boolean} If `true`, reads the contents of a directory recursively. + In recursive mode, it will list all files, sub files, and directories. **Default:** `false`. * Returns: {Promise} Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. @@ -3644,7 +3645,8 @@ changes: * `options` {string|Object} * `encoding` {string} **Default:** `'utf8'` * `withFileTypes` {boolean} **Default:** `false` - * `recursive` {boolean} **Default:** `false` + * `recursive` {boolean} If `true`, reads the contents of a directory recursively. + In recursive mode, it will list all files, sub files and directories. **Default:** `false`. * `callback` {Function} * `err` {Error} * `files` {string\[]|Buffer\[]|fs.Dirent\[]} @@ -5717,7 +5719,8 @@ changes: * `options` {string|Object} * `encoding` {string} **Default:** `'utf8'` * `withFileTypes` {boolean} **Default:** `false` - * `recursive` {boolean} **Default:** `false` + * `recursive` {boolean} If `true`, reads the contents of a directory recursively. + In recursive mode, it will list all files, sub files, and directories. **Default:** `false`. * Returns: {string\[]|Buffer\[]|fs.Dirent\[]} Reads the contents of the directory. From 0c4846651b182f908bd02d10a835ad6e2426b3f9 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Fri, 6 Oct 2023 16:06:46 +0200 Subject: [PATCH 2/2] fixup! doc: fix description of `fs.readdir` `recursive` option --- doc/api/fs.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index f31d5d43d9173b..d52201e82bd319 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1322,8 +1322,9 @@ changes: * `options` {string|Object} * `encoding` {string} **Default:** `'utf8'` * `withFileTypes` {boolean} **Default:** `false` - * `recursive` {boolean} If `true`, reads the contents of a directory recursively. - In recursive mode, it will list all files, sub files, and directories. **Default:** `false`. + * `recursive` {boolean} If `true`, reads the contents of a directory + recursively. In recursive mode, it will list all files, sub files, and + directories. **Default:** `false`. * Returns: {Promise} Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. @@ -3645,8 +3646,9 @@ changes: * `options` {string|Object} * `encoding` {string} **Default:** `'utf8'` * `withFileTypes` {boolean} **Default:** `false` - * `recursive` {boolean} If `true`, reads the contents of a directory recursively. - In recursive mode, it will list all files, sub files and directories. **Default:** `false`. + * `recursive` {boolean} If `true`, reads the contents of a directory + recursively. In recursive mode, it will list all files, sub files and + directories. **Default:** `false`. * `callback` {Function} * `err` {Error} * `files` {string\[]|Buffer\[]|fs.Dirent\[]} @@ -5719,8 +5721,9 @@ changes: * `options` {string|Object} * `encoding` {string} **Default:** `'utf8'` * `withFileTypes` {boolean} **Default:** `false` - * `recursive` {boolean} If `true`, reads the contents of a directory recursively. - In recursive mode, it will list all files, sub files, and directories. **Default:** `false`. + * `recursive` {boolean} If `true`, reads the contents of a directory + recursively. In recursive mode, it will list all files, sub files, and + directories. **Default:** `false`. * Returns: {string\[]|Buffer\[]|fs.Dirent\[]} Reads the contents of the directory.