@@ -374,7 +374,7 @@ added: v10.0.0
374
374
file data read.
375
375
* ` offset` {integer} The location in the buffer at which to start filling.
376
376
* ` length` {integer} The number of bytes to read.
377
- * ` position` {integer} The location where to begin reading data from the
377
+ * ` position` {integer|null } The location where to begin reading data from the
378
378
file. If ` null ` , data will be read from the current file position, and
379
379
the position will be updated. If ` position` is an integer, the current
380
380
file position will remain unchanged.
@@ -403,7 +403,7 @@ added:
403
403
**Default:** ` 0 `
404
404
* ` length` {integer} The number of bytes to read. **Default:**
405
405
` buffer .byteLength - offset`
406
- * ` position` {integer} The location where to begin reading data from the
406
+ * ` position` {integer|null } The location where to begin reading data from the
407
407
file. If ` null ` , data will be read from the current file position, and
408
408
the position will be updated. If ` position` is an integer, the current
409
409
file position will remain unchanged. **Default:**: ` null `
@@ -497,9 +497,9 @@ added:
497
497
-->
498
498
499
499
* ` buffers` {Buffer\[ ]|TypedArray\[ ]|DataView\[ ]}
500
- * ` position` {integer} The offset from the beginning of the file where the data
501
- should be read from. If ` position` is not a ` number` , the data will be read
502
- from the current position.
500
+ * ` position` {integer|null } The offset from the beginning of the file where
501
+ the data should be read from. If ` position` is not a ` number` , the data will
502
+ be read from the current position. **Default:** ` null `
503
503
* Returns: {Promise} Fulfills upon success an object containing two properties:
504
504
* ` bytesRead` {integer} the number of bytes read
505
505
* ` buffers` {Buffer\[ ]|TypedArray\[ ]|DataView\[ ]} property containing
@@ -597,10 +597,10 @@ changes:
597
597
to write begins. **Default:** ` 0 `
598
598
* ` length` {integer} The number of bytes from ` buffer` to write. **Default:**
599
599
` buffer .byteLength - offset`
600
- * ` position` {integer} The offset from the beginning of the file where the
600
+ * ` position` {integer|null } The offset from the beginning of the file where the
601
601
data from ` buffer` should be written. If ` position` is not a ` number` ,
602
602
the data will be written at the current position. See the POSIX pwrite(2)
603
- documentation for more detail.
603
+ documentation for more detail. **Default:** ` null `
604
604
* Returns: {Promise}
605
605
606
606
Write ` buffer` to the file.
@@ -631,10 +631,10 @@ changes:
631
631
-->
632
632
633
633
* ` string` {string}
634
- * ` position` {integer} The offset from the beginning of the file where the
634
+ * ` position` {integer|null } The offset from the beginning of the file where the
635
635
data from ` string` should be written. If ` position` is not a ` number` the
636
636
data will be written at the current position. See the POSIX pwrite(2)
637
- documentation for more detail.
637
+ documentation for more detail. **Default:** ` null `
638
638
* ` encoding` {string} The expected string encoding. **Default:** ` ' utf8' `
639
639
* Returns: {Promise}
640
640
@@ -699,9 +699,9 @@ added: v12.9.0
699
699
-->
700
700
701
701
* ` buffers` {Buffer\[ ]|TypedArray\[ ]|DataView\[ ]}
702
- * ` position` {integer} The offset from the beginning of the file where the
702
+ * ` position` {integer|null } The offset from the beginning of the file where the
703
703
data from ` buffers` should be written. If ` position` is not a ` number` ,
704
- the data will be written at the current position.
704
+ the data will be written at the current position. **Default:** ` null `
705
705
* Returns: {Promise}
706
706
707
707
Write an array of {ArrayBufferView}s to the file.
@@ -3198,7 +3198,7 @@ changes:
3198
3198
written to.
3199
3199
* ` offset` {integer} The position in ` buffer` to write the data to.
3200
3200
* ` length` {integer} The number of bytes to read.
3201
- * ` position` {integer|bigint} Specifies where to begin reading from in the
3201
+ * ` position` {integer|bigint|null } Specifies where to begin reading from in the
3202
3202
file. If ` position` is ` null ` or ` - 1 ` , data will be read from the current
3203
3203
file position, and the file position will be updated. If ` position` is an
3204
3204
integer, the file position will be unchanged.
@@ -3237,7 +3237,7 @@ changes:
3237
3237
* ` buffer` {Buffer|TypedArray|DataView} **Default:** ` Buffer .alloc (16384 )`
3238
3238
* ` offset` {integer} **Default:** ` 0 `
3239
3239
* ` length` {integer} **Default:** ` buffer .byteLength - offset`
3240
- * ` position` {integer|bigint} **Default:** ` null `
3240
+ * ` position` {integer|bigint|null } **Default:** ` null `
3241
3241
* ` callback` {Function}
3242
3242
* ` err` {Error}
3243
3243
* ` bytesRead` {integer}
@@ -3502,7 +3502,7 @@ changes:
3502
3502
3503
3503
* ` fd` {integer}
3504
3504
* ` buffers` {ArrayBufferView \[]}
3505
- * ` position` {integer}
3505
+ * ` position` {integer| null } ** Default : ** ` null `
3506
3506
* ` callback` {Function }
3507
3507
* ` err` {Error }
3508
3508
* ` bytesRead` {integer}
@@ -3924,7 +3924,7 @@ changes:
3924
3924
3925
3925
* ` target` {string| Buffer| URL }
3926
3926
* ` path` {string| Buffer| URL }
3927
- * ` type` {string}
3927
+ * ` type` {string| null } ** Default : ** ` null `
3928
3928
* ` callback` {Function }
3929
3929
* ` err` {Error }
3930
3930
@@ -3935,8 +3935,8 @@ See the POSIX symlink(2) documentation for more details.
3935
3935
3936
3936
The ` type` argument is only available on Windows and ignored on other platforms.
3937
3937
It can be set to ` 'dir'` , ` 'file'` , or ` 'junction'` . If the ` type` argument is
3938
- not set , Node .js will autodetect ` target` type and use ` 'file'` or ` 'dir'` . If
3939
- the ` target` does not exist, ` 'file'` will be used . Windows junction points
3938
+ not a string , Node .js will autodetect ` target` type and use ` 'file'` or ` 'dir'` .
3939
+ If the ` target` does not exist, ` 'file'` will be used . Windows junction points
3940
3940
require the destination path to be absolute . When using ` 'junction'` , the
3941
3941
` target` argument will automatically be normalized to absolute path.
3942
3942
@@ -4363,9 +4363,9 @@ changes:
4363
4363
4364
4364
* ` fd` {integer}
4365
4365
* ` buffer` {Buffer|TypedArray|DataView}
4366
- * ` offset` {integer}
4367
- * ` length` {integer}
4368
- * ` position` {integer}
4366
+ * ` offset` {integer} **Default:** ` 0 `
4367
+ * ` length` {integer} **Default:** ` buffer . byteLength - offset `
4368
+ * ` position` {integer|null} **Default:** ` null `
4369
4369
* ` callback` {Function}
4370
4370
* ` err` {Error}
4371
4371
* ` bytesWritten` {integer}
@@ -4426,7 +4426,7 @@ changes:
4426
4426
4427
4427
* ` fd` {integer}
4428
4428
* ` string` {string|Object}
4429
- * ` position` {integer}
4429
+ * ` position` {integer|null} **Default:** ` null `
4430
4430
* ` encoding` {string} **Default:** ` ' utf8' `
4431
4431
* ` callback` {Function}
4432
4432
* ` err` {Error}
@@ -4627,7 +4627,7 @@ changes:
4627
4627
4628
4628
* ` fd` {integer}
4629
4629
* ` buffers` {ArrayBufferView\[ ]}
4630
- * ` position` {integer}
4630
+ * ` position` {integer|null} **Default:** ` null `
4631
4631
* ` callback` {Function}
4632
4632
* ` err` {Error}
4633
4633
* ` bytesWritten` {integer}
@@ -5344,7 +5344,7 @@ object with an `encoding` property specifying the character encoding to use for
5344
5344
the link path returned. If the ` encoding` is set to ` ' buffer' ` ,
5345
5345
the link path returned will be passed as a {Buffer} object.
5346
5346
5347
- ### ` fs .readSync (fd, buffer, offset, length, position)`
5347
+ ### ` fs .readSync (fd, buffer, offset, length[ , position] )`
5348
5348
5349
5349
<!-- YAML
5350
5350
added: v0.1.21
@@ -5362,7 +5362,7 @@ changes:
5362
5362
* ` buffer` {Buffer|TypedArray|DataView}
5363
5363
* ` offset` {integer}
5364
5364
* ` length` {integer}
5365
- * ` position` {integer|bigint}
5365
+ * ` position` {integer|bigint|null} **Default:** ` null `
5366
5366
* Returns: {number}
5367
5367
5368
5368
Returns the number of ` bytesRead` .
@@ -5390,7 +5390,7 @@ changes:
5390
5390
* ` options` {Object}
5391
5391
* ` offset` {integer} **Default:** ` 0 `
5392
5392
* ` length` {integer} **Default:** ` buffer .byteLength - offset`
5393
- * ` position` {integer|bigint} **Default:** ` null `
5393
+ * ` position` {integer|bigint|null } **Default:** ` null `
5394
5394
* Returns: {number}
5395
5395
5396
5396
Returns the number of ` bytesRead` .
@@ -5411,7 +5411,7 @@ added:
5411
5411
5412
5412
* ` fd` {integer}
5413
5413
* ` buffers` {ArrayBufferView\[ ]}
5414
- * ` position` {integer}
5414
+ * ` position` {integer|null} **Default:** ` null `
5415
5415
* Returns: {number} The number of bytes read.
5416
5416
5417
5417
For detailed information, see the documentation of the asynchronous version of
@@ -5635,7 +5635,7 @@ changes:
5635
5635
5636
5636
* ` target` {string|Buffer|URL}
5637
5637
* ` path` {string|Buffer|URL}
5638
- * ` type` {string}
5638
+ * ` type` {string|null} **Default:** ` null `
5639
5639
5640
5640
Returns ` undefined ` .
5641
5641
@@ -5767,9 +5767,9 @@ changes:
5767
5767
5768
5768
* ` fd` {integer}
5769
5769
* ` buffer` {Buffer|TypedArray|DataView}
5770
- * ` offset` {integer}
5771
- * ` length` {integer}
5772
- * ` position` {integer}
5770
+ * ` offset` {integer} **Default:** ` 0 `
5771
+ * ` length` {integer} **Default:** ` buffer . byteLength - offset `
5772
+ * ` position` {integer|null} **Default:** ` null `
5773
5773
* Returns: {number} The number of bytes written.
5774
5774
5775
5775
For detailed information, see the documentation of the asynchronous version of
@@ -5791,8 +5791,8 @@ changes:
5791
5791
5792
5792
* ` fd` {integer}
5793
5793
* ` string` {string}
5794
- * ` position` {integer}
5795
- * ` encoding` {string}
5794
+ * ` position` {integer|null} **Default:** ` null `
5795
+ * ` encoding` {string} **Default:** ` ' utf8 ' `
5796
5796
* Returns: {number} The number of bytes written.
5797
5797
5798
5798
For detailed information, see the documentation of the asynchronous version of
@@ -5806,7 +5806,7 @@ added: v12.9.0
5806
5806
5807
5807
* ` fd` {integer}
5808
5808
* ` buffers` {ArrayBufferView\[ ]}
5809
- * ` position` {integer}
5809
+ * ` position` {integer|null} **Default:** ` null `
5810
5810
* Returns: {number} The number of bytes written.
5811
5811
5812
5812
For detailed information, see the documentation of the asynchronous version of
0 commit comments