@@ -1282,35 +1282,20 @@ changes:
12821282
12831283* ` path ` {string|Buffer|URL}
12841284* ` options ` {string|Object}
1285- * ` flags ` {string}
1286- * ` encoding ` {string}
1287- * ` fd ` {integer}
1288- * ` mode ` {integer}
1289- * ` autoClose ` {boolean}
1285+ * ` flags ` {string} ** Default: ** ` 'r' `
1286+ * ` encoding ` {string} ** Default: ** ` null `
1287+ * ` fd ` {integer} ** Default: ** ` null `
1288+ * ` mode ` {integer} ** Default: ** ` 0o666 `
1289+ * ` autoClose ` {boolean} ** Default: ** ` true `
12901290 * ` start ` {integer}
1291- * ` end ` {integer}
1292- * ` highWaterMark ` {integer}
1293- * Returns: {ReadStream}
1294-
1295- Returns a new [ ` ReadStream ` ] [ ] object. (See [ Readable Streams] [ ] ).
1291+ * ` end ` {integer} ** Default:** ` Infinity `
1292+ * ` highWaterMark ` {integer} ** Default:** ` 64 * 1024 `
1293+ * Returns: {fs.ReadStream} See [ Readable Streams] [ ] .
12961294
12971295Be aware that, unlike the default value set for ` highWaterMark ` on a
12981296readable stream (16 kb), the stream returned by this method has a
12991297default value of 64 kb for the same parameter.
13001298
1301- ` options ` is an object or string with the following defaults:
1302-
1303- ``` js
1304- const defaults = {
1305- flags: ' r' ,
1306- encoding: null ,
1307- fd: null ,
1308- mode: 0o666 ,
1309- autoClose: true ,
1310- highWaterMark: 64 * 1024
1311- };
1312- ```
1313-
13141299` options ` can include ` start ` and ` end ` values to read a range of bytes from
13151300the file instead of the entire file. Both ` start ` and ` end ` are inclusive and
13161301start counting at 0. If ` fd ` is specified and ` start ` is omitted or ` undefined ` ,
@@ -1360,27 +1345,13 @@ changes:
13601345
13611346* ` path ` {string|Buffer|URL}
13621347* ` options ` {string|Object}
1363- * ` flags ` {string}
1364- * ` encoding ` {string}
1365- * ` fd ` {integer}
1366- * ` mode ` {integer}
1367- * ` autoClose ` {boolean}
1348+ * ` flags ` {string} ** Default: ** ` 'w' `
1349+ * ` encoding ` {string} ** Default: ** ` 'utf8' `
1350+ * ` fd ` {integer} ** Default: ** ` null `
1351+ * ` mode ` {integer} ** Default: ** ` 0o666 `
1352+ * ` autoClose ` {boolean} ** Default: ** ` true `
13681353 * ` start ` {integer}
1369- * Returns: {WriteStream}
1370-
1371- Returns a new [ ` WriteStream ` ] [ ] object. (See [ Writable Stream] [ ] ).
1372-
1373- ` options ` is an object or string with the following defaults:
1374-
1375- ``` js
1376- const defaults = {
1377- flags: ' w' ,
1378- encoding: ' utf8' ,
1379- fd: null ,
1380- mode: 0o666 ,
1381- autoClose: true
1382- };
1383- ```
1354+ * Returns: {fs.WriteStream} See [ Writable Stream] [ ] .
13841355
13851356` options ` may also include a ` start ` option to allow writing data at
13861357some position past the beginning of the file. Modifying a file rather
@@ -1394,7 +1365,7 @@ then the file descriptor won't be closed, even if there's an error.
13941365It is the application's responsibility to close it and make sure there's no
13951366file descriptor leak.
13961367
1397- Like [ ` ReadStream ` ] [ ] , if ` fd ` is specified, ` WriteStream ` will ignore the
1368+ Like [ ` ReadStream ` ] [ ] , if ` fd ` is specified, [ ` WriteStream ` ] [ ] will ignore the
13981369` path ` argument and will use the specified file descriptor. This means that no
13991370` 'open' ` event will be emitted. Note that ` fd ` should be blocking; non-blocking
14001371` fd ` s should be passed to [ ` net.Socket ` ] [ ] .
@@ -1643,7 +1614,7 @@ added: v0.1.95
16431614* ` fd ` {integer}
16441615* Returns: {fs.Stats}
16451616
1646- Synchronous fstat(2). Returns an instance of [ ` fs.Stats ` ] [ ] .
1617+ Synchronous fstat(2).
16471618
16481619## fs.fsync(fd, callback)
16491620<!-- YAML
@@ -1918,7 +1889,7 @@ changes:
19181889* ` path ` {string|Buffer|URL}
19191890* Returns: {fs.Stats}
19201891
1921- Synchronous lstat(2). Returns an instance of [ ` fs.Stats ` ] [ ] .
1892+ Synchronous lstat(2).
19221893
19231894## fs.mkdir(path[ , mode] , callback)
19241895<!-- YAML
@@ -2267,10 +2238,9 @@ changes:
22672238* ` path ` {string|Buffer|URL}
22682239* ` options ` {string|Object}
22692240 * ` encoding ` {string} ** Default:** ` 'utf8' `
2270- * Returns: {string[ ] } An array of filenames
2241+ * Returns: {string[ ] } An array of filenames excluding ` '.' ` and ` '..' ` .
22712242
2272- Synchronous readdir(3). Returns an array of filenames excluding ` '.' ` and
2273- ` '..' ` .
2243+ Synchronous readdir(3).
22742244
22752245The optional ` options ` argument can be a string specifying an encoding, or an
22762246object with an ` encoding ` property specifying the character encoding to use for
@@ -2747,7 +2717,7 @@ changes:
27472717* ` path ` {string|Buffer|URL}
27482718* Returns: {fs.Stats}
27492719
2750- Synchronous stat(2). Returns an instance of [ ` fs.Stats ` ] [ ] .
2720+ Synchronous stat(2).
27512721
27522722## fs.symlink(target, path[ , type] , callback)
27532723<!-- YAML
@@ -2988,9 +2958,10 @@ changes:
29882958* ` listener ` {Function|undefined} ** Default:** ` undefined `
29892959 * ` eventType ` {string}
29902960 * ` filename ` {string|Buffer}
2961+ * Returns: {fs.FSWatcher}
29912962
29922963Watch for changes on ` filename ` , where ` filename ` is either a file or a
2993- directory. The returned object is a [ ` fs.FSWatcher ` ] [ ] .
2964+ directory.
29942965
29952966The second argument is optional. If ` options ` is provided as a string, it
29962967specifies the ` encoding ` . Otherwise ` options ` should be passed as an object.
0 commit comments