@@ -437,7 +437,7 @@ changes:
437
437
-->
438
438
439
439
* ` path ` {string|Buffer|URL}
440
- * ` mode ` {integer}
440
+ * ` mode ` {integer} ** Default: ** ` fs.constants.F_OK `
441
441
* ` callback ` {Function}
442
442
443
443
Tests a user's permissions for the file or directory specified by ` path ` .
@@ -563,7 +563,7 @@ changes:
563
563
-->
564
564
565
565
* ` path ` {string|Buffer|URL}
566
- * ` mode ` {integer}
566
+ * ` mode ` {integer} ** Default: ** ` fs.constants.F_OK `
567
567
568
568
Synchronous version of [ ` fs.access() ` ] [ ] . This throws if any accessibility
569
569
checks fail, and does nothing otherwise.
@@ -587,9 +587,9 @@ changes:
587
587
* ` file ` {string|Buffer|number} filename or file descriptor
588
588
* ` data ` {string|Buffer}
589
589
* ` options ` {Object|string}
590
- * ` encoding ` {string|null} default = ` 'utf8' `
591
- * ` mode ` {integer} default = ` 0o666 `
592
- * ` flag ` {string} default = ` 'a' `
590
+ * ` encoding ` {string|null} ** Default: ** ` 'utf8' `
591
+ * ` mode ` {integer} ** Default: ** ` 0o666 `
592
+ * ` flag ` {string} ** Default: ** ` 'a' `
593
593
* ` callback ` {Function}
594
594
595
595
Asynchronously append data to a file, creating the file if it does not yet exist.
@@ -630,9 +630,9 @@ changes:
630
630
* ` file ` {string|Buffer|number} filename or file descriptor
631
631
* ` data ` {string|Buffer}
632
632
* ` options ` {Object|string}
633
- * ` encoding ` {string|null} default = ` 'utf8' `
634
- * ` mode ` {integer} default = ` 0o666 `
635
- * ` flag ` {string} default = ` 'a' `
633
+ * ` encoding ` {string|null} ** Default: ** ` 'utf8' `
634
+ * ` mode ` {integer} ** Default: ** ` 0o666 `
635
+ * ` flag ` {string} ** Default: ** ` 'a' `
636
636
637
637
The synchronous version of [ ` fs.appendFile() ` ] [ ] . Returns ` undefined ` .
638
638
@@ -1136,7 +1136,7 @@ added: v0.1.96
1136
1136
1137
1137
Synchronous fsync(2). Returns ` undefined ` .
1138
1138
1139
- ## fs.ftruncate(fd, len, callback)
1139
+ ## fs.ftruncate(fd[ , len] , callback)
1140
1140
<!-- YAML
1141
1141
added: v0.8.6
1142
1142
changes:
@@ -1147,7 +1147,7 @@ changes:
1147
1147
-->
1148
1148
1149
1149
* ` fd ` {integer}
1150
- * ` len ` {integer} default = ` 0 `
1150
+ * ` len ` {integer} ** Default: ** ` 0 `
1151
1151
* ` callback ` {Function}
1152
1152
1153
1153
Asynchronous ftruncate(2). No arguments other than a possible exception are
@@ -1194,13 +1194,13 @@ fs.ftruncate(fd, 10, (err) => {
1194
1194
1195
1195
The last three bytes are null bytes ('\0'), to compensate the over-truncation.
1196
1196
1197
- ## fs.ftruncateSync(fd, len)
1197
+ ## fs.ftruncateSync(fd[ , len] )
1198
1198
<!-- YAML
1199
1199
added: v0.8.6
1200
1200
-->
1201
1201
1202
1202
* ` fd ` {integer}
1203
- * ` len ` {integer} default = ` 0 `
1203
+ * ` len ` {integer} ** Default: ** ` 0 `
1204
1204
1205
1205
Synchronous ftruncate(2). Returns ` undefined ` .
1206
1206
@@ -1392,7 +1392,7 @@ changes:
1392
1392
-->
1393
1393
1394
1394
* ` path ` {string|Buffer|URL}
1395
- * ` mode ` {integer}
1395
+ * ` mode ` {integer} ** Default: ** ` 0o777 `
1396
1396
* ` callback ` {Function}
1397
1397
1398
1398
Asynchronous mkdir(2). No arguments other than a possible exception are given
@@ -1409,7 +1409,7 @@ changes:
1409
1409
-->
1410
1410
1411
1411
* ` path ` {string|Buffer|URL}
1412
- * ` mode ` {integer}
1412
+ * ` mode ` {integer} ** Default: ** ` 0o777 `
1413
1413
1414
1414
Synchronous mkdir(2). Returns ` undefined ` .
1415
1415
@@ -1428,7 +1428,7 @@ changes:
1428
1428
1429
1429
* ` prefix ` {string}
1430
1430
* ` options ` {string|Object}
1431
- * ` encoding ` {string} default = ` 'utf8' `
1431
+ * ` encoding ` {string} ** Default: ** ` 'utf8' `
1432
1432
* ` callback ` {Function}
1433
1433
1434
1434
Creates a unique temporary directory.
@@ -1490,7 +1490,7 @@ added: v5.10.0
1490
1490
1491
1491
* ` prefix ` {string}
1492
1492
* ` options ` {string|Object}
1493
- * ` encoding ` {string} default = ` 'utf8' `
1493
+ * ` encoding ` {string} ** Default: ** ` 'utf8' `
1494
1494
1495
1495
The synchronous version of [ ` fs.mkdtemp() ` ] [ ] . Returns the created
1496
1496
folder path.
@@ -1510,7 +1510,7 @@ changes:
1510
1510
1511
1511
* ` path ` {string|Buffer|URL}
1512
1512
* ` flags ` {string|number}
1513
- * ` mode ` {integer}
1513
+ * ` mode ` {integer} ** Default: ** ` 0o666 `
1514
1514
* ` callback ` {Function}
1515
1515
1516
1516
Asynchronous file open. See open(2). ` flags ` can be:
@@ -1552,7 +1552,7 @@ The file is created if it does not exist.
1552
1552
* ` 'ax+' ` - Like ` 'a+' ` but fails if ` path ` exists.
1553
1553
1554
1554
` mode ` sets the file mode (permission and sticky bits), but only if the file was
1555
- created. It defaults to ` 0666 ` , readable and writable.
1555
+ created. It defaults to ` 0o666 ` , readable and writable.
1556
1556
1557
1557
The callback gets two arguments ` (err, fd) ` .
1558
1558
@@ -1599,7 +1599,7 @@ changes:
1599
1599
1600
1600
* ` path ` {string|Buffer|URL}
1601
1601
* ` flags ` {string|number}
1602
- * ` mode ` {integer}
1602
+ * ` mode ` {integer} ** Default: ** ` 0o666 `
1603
1603
1604
1604
Synchronous version of [ ` fs.open() ` ] [ ] . Returns an integer representing the file
1605
1605
descriptor.
@@ -1658,7 +1658,7 @@ changes:
1658
1658
1659
1659
* ` path ` {string|Buffer|URL}
1660
1660
* ` options ` {string|Object}
1661
- * ` encoding ` {string} default = ` 'utf8' `
1661
+ * ` encoding ` {string} ** Default: ** ` 'utf8' `
1662
1662
* ` callback ` {Function}
1663
1663
1664
1664
Asynchronous readdir(3). Reads the contents of a directory.
@@ -1682,7 +1682,7 @@ changes:
1682
1682
1683
1683
* ` path ` {string|Buffer|URL}
1684
1684
* ` options ` {string|Object}
1685
- * ` encoding ` {string} default = ` 'utf8' `
1685
+ * ` encoding ` {string} ** Default: ** ` 'utf8' `
1686
1686
1687
1687
Synchronous readdir(3). Returns an array of filenames excluding ` '.' ` and
1688
1688
` '..' ` .
@@ -1715,8 +1715,8 @@ changes:
1715
1715
1716
1716
* ` path ` {string|Buffer|URL|integer} filename or file descriptor
1717
1717
* ` options ` {Object|string}
1718
- * ` encoding ` {string|null} default = ` null `
1719
- * ` flag ` {string} default = ` 'r' `
1718
+ * ` encoding ` {string|null} ** Default: ** ` null `
1719
+ * ` flag ` {string} ** Default: ** ` 'r' `
1720
1720
* ` callback ` {Function}
1721
1721
1722
1722
Asynchronously reads the entire contents of a file. Example:
@@ -1775,8 +1775,8 @@ changes:
1775
1775
1776
1776
* ` path ` {string|Buffer|URL|integer} filename or file descriptor
1777
1777
* ` options ` {Object|string}
1778
- * ` encoding ` {string|null} default = ` null `
1779
- * ` flag ` {string} default = ` 'r' `
1778
+ * ` encoding ` {string|null} ** Default: ** ` null `
1779
+ * ` flag ` {string} ** Default: ** ` 'r' `
1780
1780
1781
1781
Synchronous version of [ ` fs.readFile() ` ] [ ] . Returns the contents of the ` path ` .
1782
1782
@@ -1811,7 +1811,7 @@ changes:
1811
1811
1812
1812
* ` path ` {string|Buffer|URL}
1813
1813
* ` options ` {string|Object}
1814
- * ` encoding ` {string} default = ` 'utf8' `
1814
+ * ` encoding ` {string} ** Default: ** ` 'utf8' `
1815
1815
* ` callback ` {Function}
1816
1816
1817
1817
Asynchronous readlink(2). The callback gets two arguments `(err,
@@ -1834,7 +1834,7 @@ changes:
1834
1834
1835
1835
* ` path ` {string|Buffer|URL}
1836
1836
* ` options ` {string|Object}
1837
- * ` encoding ` {string} default = ` 'utf8' `
1837
+ * ` encoding ` {string} ** Default: ** ` 'utf8' `
1838
1838
1839
1839
Synchronous readlink(2). Returns the symbolic link's string value.
1840
1840
@@ -1886,7 +1886,7 @@ changes:
1886
1886
1887
1887
* ` path ` {string|Buffer|URL}
1888
1888
* ` options ` {string|Object}
1889
- * ` encoding ` {string} default = ` 'utf8' `
1889
+ * ` encoding ` {string} ** Default: ** ` 'utf8' `
1890
1890
* ` callback ` {Function}
1891
1891
1892
1892
Asynchronous realpath(3). The ` callback ` gets two arguments `(err,
@@ -1924,7 +1924,7 @@ changes:
1924
1924
1925
1925
* ` path ` {string|Buffer|URL}
1926
1926
* ` options ` {string|Object}
1927
- * ` encoding ` {string} default = ` 'utf8' `
1927
+ * ` encoding ` {string} ** Default: ** ` 'utf8' `
1928
1928
1929
1929
Synchronous realpath(3). Returns the resolved path.
1930
1930
@@ -2067,7 +2067,7 @@ changes:
2067
2067
2068
2068
* ` target ` {string|Buffer|URL}
2069
2069
* ` path ` {string|Buffer|URL}
2070
- * ` type ` {string}
2070
+ * ` type ` {string} ** Default: ** ` 'file' `
2071
2071
* ` callback ` {Function}
2072
2072
2073
2073
Asynchronous symlink(2). No arguments other than a possible exception are given
@@ -2098,11 +2098,11 @@ changes:
2098
2098
2099
2099
* ` target ` {string|Buffer|URL}
2100
2100
* ` path ` {string|Buffer|URL}
2101
- * ` type ` {string}
2101
+ * ` type ` {string} ** Default: ** ` 'file' `
2102
2102
2103
2103
Synchronous symlink(2). Returns ` undefined ` .
2104
2104
2105
- ## fs.truncate(path, len, callback)
2105
+ ## fs.truncate(path[ , len] , callback)
2106
2106
<!-- YAML
2107
2107
added: v0.8.6
2108
2108
changes:
@@ -2113,20 +2113,20 @@ changes:
2113
2113
-->
2114
2114
2115
2115
* ` path ` {string|Buffer}
2116
- * ` len ` {integer} default = ` 0 `
2116
+ * ` len ` {integer} ** Default: ** ` 0 `
2117
2117
* ` callback ` {Function}
2118
2118
2119
2119
Asynchronous truncate(2). No arguments other than a possible exception are
2120
2120
given to the completion callback. A file descriptor can also be passed as the
2121
2121
first argument. In this case, ` fs.ftruncate() ` is called.
2122
2122
2123
- ## fs.truncateSync(path, len)
2123
+ ## fs.truncateSync(path[ , len] )
2124
2124
<!-- YAML
2125
2125
added: v0.8.6
2126
2126
-->
2127
2127
2128
2128
* ` path ` {string|Buffer}
2129
- * ` len ` {integer} default = ` 0 `
2129
+ * ` len ` {integer} ** Default: ** ` 0 `
2130
2130
2131
2131
Synchronous truncate(2). Returns ` undefined ` . A file descriptor can also be
2132
2132
passed as the first argument. In this case, ` fs.ftruncateSync() ` is called.
@@ -2171,7 +2171,7 @@ added: v0.1.31
2171
2171
-->
2172
2172
2173
2173
* ` filename ` {string|Buffer}
2174
- * ` listener ` {Function}
2174
+ * ` listener ` {Function|undefined} ** Default: ** ` undefined `
2175
2175
2176
2176
Stop watching for changes on ` filename ` . If ` listener ` is specified, only that
2177
2177
particular listener is removed. Otherwise, * all* listeners are removed,
@@ -2254,14 +2254,14 @@ changes:
2254
2254
* ` filename ` {string|Buffer|URL}
2255
2255
* ` options ` {string|Object}
2256
2256
* ` persistent ` {boolean} Indicates whether the process should continue to run
2257
- as long as files are being watched. default = ` true `
2257
+ as long as files are being watched. ** Default: ** ` true `
2258
2258
* ` recursive ` {boolean} Indicates whether all subdirectories should be
2259
2259
watched, or only the current directory. This applies when a directory is
2260
- specified, and only on supported platforms (See [ Caveats] [ ] ). default =
2260
+ specified, and only on supported platforms (See [ Caveats] [ ] ). ** Default: **
2261
2261
` false `
2262
2262
* ` encoding ` {string} Specifies the character encoding to be used for the
2263
- filename passed to the listener. default = ` 'utf8' `
2264
- * ` listener ` {Function}
2263
+ filename passed to the listener. ** Default: ** ` 'utf8' `
2264
+ * ` listener ` {Function|undefined} ** Default: ** ` undefined `
2265
2265
2266
2266
Watch for changes on ` filename ` , where ` filename ` is either a file or a
2267
2267
directory. The returned object is a [ ` fs.FSWatcher ` ] [ ] .
@@ -2361,8 +2361,8 @@ changes:
2361
2361
2362
2362
* ` filename ` {string|Buffer|URL}
2363
2363
* ` options ` {Object}
2364
- * ` persistent ` {boolean}
2365
- * ` interval ` {integer}
2364
+ * ` persistent ` {boolean} ** Default: ** ` true `
2365
+ * ` interval ` {integer} ** Default: ** ` 5007 `
2366
2366
* ` listener ` {Function}
2367
2367
2368
2368
Watch for changes on ` filename ` . The callback ` listener ` will be called each
@@ -2510,9 +2510,9 @@ changes:
2510
2510
* ` file ` {string|Buffer|integer} filename or file descriptor
2511
2511
* ` data ` {string|Buffer|Uint8Array}
2512
2512
* ` options ` {Object|string}
2513
- * ` encoding ` {string|null} default = ` 'utf8' `
2514
- * ` mode ` {integer} default = ` 0o666 `
2515
- * ` flag ` {string} default = ` 'w' `
2513
+ * ` encoding ` {string|null} ** Default: ** ` 'utf8' `
2514
+ * ` mode ` {integer} ** Default: ** ` 0o666 `
2515
+ * ` flag ` {string} ** Default: ** ` 'w' `
2516
2516
* ` callback ` {Function}
2517
2517
2518
2518
Asynchronously writes data to a file, replacing the file if it already exists.
@@ -2560,9 +2560,9 @@ changes:
2560
2560
* ` file ` {string|Buffer|integer} filename or file descriptor
2561
2561
* ` data ` {string|Buffer|Uint8Array}
2562
2562
* ` options ` {Object|string}
2563
- * ` encoding ` {string|null} default = ` 'utf8' `
2564
- * ` mode ` {integer} default = ` 0o666 `
2565
- * ` flag ` {string} default = ` 'w' `
2563
+ * ` encoding ` {string|null} ** Default: ** ` 'utf8' `
2564
+ * ` mode ` {integer} ** Default: ** ` 0o666 `
2565
+ * ` flag ` {string} ** Default: ** ` 'w' `
2566
2566
2567
2567
The synchronous version of [ ` fs.writeFile() ` ] [ ] . Returns ` undefined ` .
2568
2568
0 commit comments