diff --git a/doc/api/fs.md b/doc/api/fs.md index a6736d127e9bbc..885272724d2384 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -351,13 +351,11 @@ added: REPLACEME Synchronously close the directory's underlying resource handle. Subsequent reads will result in errors. -### dir.read([options]) +### dir.read() -* `options` {Object} - * `encoding` {string|null} **Default:** `'utf8'` * Returns: {Promise} containing {fs.Dirent} Asynchronously read the next directory entry via readdir(3) as an @@ -369,13 +367,11 @@ is completed. _Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms._ -### dir.read([options, ]callback) +### dir.read(callback) -* `options` {Object} - * `encoding` {string|null} **Default:** `'utf8'` * `callback` {Function} * `err` {Error} * `dirent` {fs.Dirent} @@ -385,25 +381,19 @@ Asynchronously read the next directory entry via readdir(3) as an The `callback` will be called with a [Dirent][] after the read is completed. -The `encoding` option sets the encoding of the `name` in the `dirent`. - _Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms._ -### dir.readSync([options]) +### dir.readSync() -* `options` {Object} - * `encoding` {string|null} **Default:** `'utf8'` * Returns: {fs.Dirent} Synchronously read the next directory entry via readdir(3) as an [`fs.Dirent`][]. -The `encoding` option sets the encoding of the `name` in the `dirent`. - _Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms._ @@ -2658,8 +2648,7 @@ Creates an [`fs.Dir`][], which contains all further functions for reading from and cleaning up the directory. The `encoding` option sets the encoding for the `path` while opening the -directory and subsequent read operations (unless otherwise overriden during -reads from the directory). +directory and subsequent read operations. ## fs.opendirSync(path[, options])