Skip to content

Commit 3d03ca9

Browse files
RamdohokarAnghatargos
RamdohokarAngha
authored andcommitted
doc: fix description of fs.readdir recursive option
PR-URL: #48902 Fixes: #48640 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 9302806 commit 3d03ca9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

doc/api/fs.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,9 @@ changes:
12981298
* `options` {string|Object}
12991299
* `encoding` {string} **Default:** `'utf8'`
13001300
* `withFileTypes` {boolean} **Default:** `false`
1301-
* `recursive` {boolean} **Default:** `false`
1301+
* `recursive` {boolean} If `true`, reads the contents of a directory
1302+
recursively. In recursive mode, it will list all files, sub files, and
1303+
directories. **Default:** `false`.
13021304
* Returns: {Promise} Fulfills with an array of the names of the files in
13031305
the directory excluding `'.'` and `'..'`.
13041306
@@ -3614,7 +3616,9 @@ changes:
36143616
* `options` {string|Object}
36153617
* `encoding` {string} **Default:** `'utf8'`
36163618
* `withFileTypes` {boolean} **Default:** `false`
3617-
* `recursive` {boolean} **Default:** `false`
3619+
* `recursive` {boolean} If `true`, reads the contents of a directory
3620+
recursively. In recursive mode, it will list all files, sub files and
3621+
directories. **Default:** `false`.
36183622
* `callback` {Function}
36193623
* `err` {Error}
36203624
* `files` {string\[]|Buffer\[]|fs.Dirent\[]}
@@ -5681,7 +5685,9 @@ changes:
56815685
* `options` {string|Object}
56825686
* `encoding` {string} **Default:** `'utf8'`
56835687
* `withFileTypes` {boolean} **Default:** `false`
5684-
* `recursive` {boolean} **Default:** `false`
5688+
* `recursive` {boolean} If `true`, reads the contents of a directory
5689+
recursively. In recursive mode, it will list all files, sub files, and
5690+
directories. **Default:** `false`.
56855691
* Returns: {string\[]|Buffer\[]|fs.Dirent\[]}
56865692
56875693
Reads the contents of the directory.

0 commit comments

Comments
 (0)