@@ -1137,8 +1137,8 @@ changes:
1137
1137
* ` path ` {string|Buffer|URL}
1138
1138
* ` mode ` {integer}
1139
1139
1140
- Synchronously changes the permissions of a file. Returns ` undefined ` .
1141
- This is the synchronous version of [ ` fs.chmod() ` ] [ ] .
1140
+ For detailed information, see the documentation of the asynchronous version of
1141
+ this API: [ ` fs.chmod() ` ] [ ] .
1142
1142
1143
1143
See also: chmod(2).
1144
1144
@@ -1562,13 +1562,16 @@ changes:
1562
1562
* ` path ` {string|Buffer|URL}
1563
1563
* Returns: {boolean}
1564
1564
1565
- Synchronous version of [ ` fs.exists() ` ] [ ] .
1566
1565
Returns ` true ` if the path exists, ` false ` otherwise.
1567
1566
1567
+ For detailed information, see the documentation of the asynchronous version of
1568
+ this API: [ ` fs.exists() ` ] [ ] .
1569
+
1568
1570
` fs.exists() ` is deprecated, but ` fs.existsSync() ` is not. The ` callback `
1569
1571
parameter to ` fs.exists() ` accepts parameters that are inconsistent with other
1570
1572
Node.js callbacks. ` fs.existsSync() ` does not use a callback.
1571
1573
1574
+
1572
1575
## fs.fchmod(fd, mode, callback)
1573
1576
<!-- YAML
1574
1577
added: v0.4.7
@@ -1815,7 +1818,10 @@ added: v0.8.6
1815
1818
* ` fd ` {integer}
1816
1819
* ` len ` {integer} ** Default:** ` 0 `
1817
1820
1818
- Synchronous ftruncate(2). Returns ` undefined ` .
1821
+ Returns ` undefined ` .
1822
+
1823
+ For detailed information, see the documentation of the asynchronous version of
1824
+ this API: [ ` fs.ftruncate() ` ] [ ] .
1819
1825
1820
1826
## fs.futimes(fd, atime, mtime, callback)
1821
1827
<!-- YAML
@@ -2165,8 +2171,10 @@ added: v5.10.0
2165
2171
* ` encoding ` {string} ** Default:** ` 'utf8' `
2166
2172
* Returns: {string}
2167
2173
2168
- The synchronous version of [ ` fs.mkdtemp() ` ] [ ] . Returns the created
2169
- folder path.
2174
+ Returns the created folder path.
2175
+
2176
+ For detailed information, see the documentation of the asynchronous version of
2177
+ this API: [ ` fs.mkdtemp() ` ] [ ] .
2170
2178
2171
2179
The optional ` options ` argument can be a string specifying an encoding, or an
2172
2180
object with an ` encoding ` property specifying the character encoding to use.
@@ -2222,8 +2230,10 @@ changes:
2222
2230
* ` mode ` {integer} ** Default:** ` 0o666 `
2223
2231
* Returns: {number}
2224
2232
2225
- Synchronous version of [ ` fs.open() ` ] [ ] . Returns an integer representing the file
2226
- descriptor.
2233
+ Returns an integer representing the file descriptor.
2234
+
2235
+ For detailed information, see the documentation of the asynchronous version of
2236
+ this API: [ ` fs.open() ` ] [ ] .
2227
2237
2228
2238
## fs.read(fd, buffer, offset, length, position, callback)
2229
2239
<!-- YAML
@@ -2421,7 +2431,10 @@ changes:
2421
2431
* ` flag ` {string} See [ support of file system ` flags ` ] [ ] . ** Default:** ` 'r' ` .
2422
2432
* Returns: {string|Buffer}
2423
2433
2424
- Synchronous version of [ ` fs.readFile() ` ] [ ] . Returns the contents of the ` path ` .
2434
+ Returns the contents of the ` path ` .
2435
+
2436
+ For detailed information, see the documentation of the asynchronous version of
2437
+ this API: [ ` fs.readFile() ` ] [ ] .
2425
2438
2426
2439
If the ` encoding ` option is specified then this function returns a
2427
2440
string. Otherwise it returns a buffer.
@@ -2509,7 +2522,10 @@ changes:
2509
2522
* ` position ` {integer}
2510
2523
* Returns: {number}
2511
2524
2512
- Synchronous version of [ ` fs.read() ` ] [ ] . Returns the number of ` bytesRead ` .
2525
+ Returns the number of ` bytesRead ` .
2526
+
2527
+ For detailed information, see the documentation of the asynchronous version of
2528
+ this API: [ ` fs.read() ` ] [ ] .
2513
2529
2514
2530
## fs.realpath(path[ , options] , callback)
2515
2531
<!-- YAML
@@ -2624,7 +2640,10 @@ changes:
2624
2640
* ` encoding ` {string} ** Default:** ` 'utf8' `
2625
2641
* Returns: {string|Buffer}
2626
2642
2627
- Synchronous version of [ ` fs.realpath() ` ] [ ] . Returns the resolved pathname.
2643
+ Returns the resolved pathname.
2644
+
2645
+ For detailed information, see the documentation of the asynchronous version of
2646
+ this API: [ ` fs.realpath() ` ] [ ] .
2628
2647
2629
2648
## fs.realpathSync.native(path[ , options] )
2630
2649
<!-- YAML
@@ -2860,7 +2879,10 @@ changes:
2860
2879
* ` path ` {string|Buffer|URL}
2861
2880
* ` type ` {string} ** Default:** ` 'file' `
2862
2881
2863
- Synchronous symlink(2). Returns ` undefined ` .
2882
+ Returns ` undefined ` .
2883
+
2884
+ For detailed information, see the documentation of the asynchronous version of
2885
+ this API: [ ` fs.symlink() ` ] [ ] .
2864
2886
2865
2887
## fs.truncate(path[ , len] , callback)
2866
2888
<!-- YAML
@@ -3036,7 +3058,10 @@ changes:
3036
3058
* ` atime ` {integer}
3037
3059
* ` mtime ` {integer}
3038
3060
3039
- Synchronous version of [ ` fs.utimes() ` ] [ ] . Returns ` undefined ` .
3061
+ Returns ` undefined ` .
3062
+
3063
+ For detailed information, see the documentation of the asynchronous version of
3064
+ this API: [ ` fs.utimes() ` ] [ ] .
3040
3065
3041
3066
## fs.watch(filename[ , options] [ , listener ] )
3042
3067
<!-- YAML
@@ -3387,7 +3412,10 @@ changes:
3387
3412
* ` mode ` {integer} ** Default:** ` 0o666 `
3388
3413
* ` flag ` {string} See [ support of file system ` flags ` ] [ ] . ** Default:** ` 'w' ` .
3389
3414
3390
- The synchronous version of [ ` fs.writeFile() ` ] [ ] . Returns ` undefined ` .
3415
+ Returns ` undefined ` .
3416
+
3417
+ For detailed information, see the documentation of the asynchronous version of
3418
+ this API: [ ` fs.writeFile() ` ] [ ] .
3391
3419
3392
3420
## fs.writeSync(fd, buffer[ , offset[ , length[ , position]]] )
3393
3421
<!-- YAML
@@ -3423,7 +3451,10 @@ changes:
3423
3451
* ` encoding ` {string}
3424
3452
* Returns: {number}
3425
3453
3426
- Synchronous versions of [ ` fs.write() ` ] [ ] . Returns the number of bytes written.
3454
+ Returns the number of bytes written.
3455
+
3456
+ For detailed information, see the documentation of the asynchronous version of
3457
+ this API: [ ` fs.write() ` ] [ ] .
3427
3458
3428
3459
## fs Promises API
3429
3460
@@ -4588,6 +4619,7 @@ the file contents.
4588
4619
[ `fs.copyFile()` ] : #fs_fs_copyfile_src_dest_flags_callback
4589
4620
[ `fs.exists()` ] : fs.html#fs_fs_exists_path_callback
4590
4621
[ `fs.fstat()` ] : #fs_fs_fstat_fd_options_callback
4622
+ [ `fs.ftruncate()` ] : #fs_fs_ftruncate_fd_len_callback
4591
4623
[ `fs.futimes()` ] : #fs_fs_futimes_fd_atime_mtime_callback
4592
4624
[ `fs.lstat()` ] : #fs_fs_lstat_path_options_callback
4593
4625
[ `fs.mkdir()` ] : #fs_fs_mkdir_path_mode_callback
@@ -4599,6 +4631,7 @@ the file contents.
4599
4631
[ `fs.realpath()` ] : #fs_fs_realpath_path_options_callback
4600
4632
[ `fs.rmdir()` ] : #fs_fs_rmdir_path_callback
4601
4633
[ `fs.stat()` ] : #fs_fs_stat_path_options_callback
4634
+ [ `fs.symlink()` ] : #fs_fs_symlink_target_path_type_callback
4602
4635
[ `fs.utimes()` ] : #fs_fs_utimes_path_atime_mtime_callback
4603
4636
[ `fs.watch()` ] : #fs_fs_watch_filename_options_listener
4604
4637
[ `fs.write()` ] : #fs_fs_write_fd_buffer_offset_length_position_callback
0 commit comments