| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -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` | |
@@ -450,9 +450,9 @@ added: | |||
| 450 | 450 | --> | |
| 451 | 451 | ||
| 452 | 452 | * `buffers` {Buffer\[]|TypedArray\[]|DataView\[]} | |
| 453 | - * `position` {integer} The offset from the beginning of the file where the data | ||
| 454 | - should be read from. If `position` is not a `number`, the data will be read | ||
| 455 | - from the current position. | ||
| 453 | + * `position` {integer|null} The offset from the beginning of the file where | ||
| 454 | + the data should be read from. If `position` is not a `number`, the data will | ||
| 455 | + be read from the current position. **Default:** `null` | ||
| 456 | 456 | * Returns: {Promise} Fulfills upon success an object containing two properties: | |
| 457 | 457 | * `bytesRead` {integer} the number of bytes read | |
| 458 | 458 | * `buffers` {Buffer\[]|TypedArray\[]|DataView\[]} property containing | |
@@ -550,10 +550,10 @@ changes: | |||
| 550 | 550 | to write begins. **Default:** `0` | |
| 551 | 551 | * `length` {integer} The number of bytes from `buffer` to write. **Default:** | |
| 552 | 552 | `buffer.byteLength - offset` | |
| 553 | - * `position` {integer} The offset from the beginning of the file where the | ||
| 553 | + * `position` {integer|null} The offset from the beginning of the file where the | ||
| 554 | 554 | data from `buffer` should be written. If `position` is not a `number`, | |
| 555 | 555 | the data will be written at the current position. See the POSIX pwrite(2) | |
| 556 | - documentation for more detail. | ||
| 556 | + documentation for more detail. **Default:** `null` | ||
| 557 | 557 | * Returns: {Promise} | |
| 558 | 558 | ||
| 559 | 559 | Write `buffer` to the file. | |
@@ -584,10 +584,10 @@ changes: | |||
| 584 | 584 | --> | |
| 585 | 585 | ||
| 586 | 586 | * `string` {string} | |
| 587 | - * `position` {integer} The offset from the beginning of the file where the | ||
| 587 | + * `position` {integer|null} The offset from the beginning of the file where the | ||
| 588 | 588 | data from `string` should be written. If `position` is not a `number` the | |
| 589 | 589 | data will be written at the current position. See the POSIX pwrite(2) | |
| 590 | - documentation for more detail. | ||
| 590 | + documentation for more detail. **Default:** `null` | ||
| 591 | 591 | * `encoding` {string} The expected string encoding. **Default:** `'utf8'` | |
| 592 | 592 | * Returns: {Promise} | |
| 593 | 593 | ||
@@ -650,9 +650,9 @@ added: v12.9.0 | |||
| 650 | 650 | --> | |
| 651 | 651 | ||
| 652 | 652 | * `buffers` {Buffer\[]|TypedArray\[]|DataView\[]} | |
| 653 | - * `position` {integer} The offset from the beginning of the file where the | ||
| 653 | + * `position` {integer|null} The offset from the beginning of the file where the | ||
| 654 | 654 | data from `buffers` should be written. If `position` is not a `number`, | |
| 655 | - the data will be written at the current position. | ||
| 655 | + the data will be written at the current position. **Default:** `null` | ||
| 656 | 656 | * Returns: {Promise} | |
| 657 | 657 | ||
| 658 | 658 | Write an array of {ArrayBufferView}s to the file. | |
@@ -3009,7 +3009,7 @@ changes: | |||
| 3009 | 3009 | written to. | |
| 3010 | 3010 | * `offset` {integer} The position in `buffer` to write the data to. | |
| 3011 | 3011 | * `length` {integer} The number of bytes to read. | |
| 3012 | - * `position` {integer|bigint} Specifies where to begin reading from in the | ||
| 3012 | + * `position` {integer|bigint|null} Specifies where to begin reading from in the | ||
| 3013 | 3013 | file. If `position` is `null` or `-1 `, data will be read from the current | |
| 3014 | 3014 | file position, and the file position will be updated. If `position` is an | |
| 3015 | 3015 | integer, the file position will be unchanged. | |
@@ -3048,7 +3048,7 @@ changes: | |||
| 3048 | 3048 | * `buffer` {Buffer|TypedArray|DataView} **Default:** `Buffer.alloc(16384)` | |
| 3049 | 3049 | * `offset` {integer} **Default:** `0` | |
| 3050 | 3050 | * `length` {integer} **Default:** `buffer.byteLength - offset` | |
| 3051 | - * `position` {integer|bigint} **Default:** `null` | ||
| 3051 | + * `position` {integer|bigint|null} **Default:** `null` | ||
| 3052 | 3052 | * `callback` {Function} | |
| 3053 | 3053 | * `err` {Error} | |
| 3054 | 3054 | * `bytesRead` {integer} | |
@@ -3290,7 +3290,7 @@ added: | |||
| 3290 | 3290 | ||
| 3291 | 3291 | * `fd` {integer} | |
| 3292 | 3292 | * `buffers` {ArrayBufferView\[]} | |
| 3293 | - * `position` {integer} | ||
| 3293 | + * `position` {integer|null} **Default:** `null` | ||
| 3294 | 3294 | * `callback` {Function} | |
| 3295 | 3295 | * `err` {Error} | |
| 3296 | 3296 | * `bytesRead` {integer} | |
@@ -3679,7 +3679,7 @@ changes: | |||
| 3679 | 3679 | ||
| 3680 | 3680 | * `target` {string|Buffer|URL} | |
| 3681 | 3681 | * `path` {string|Buffer|URL} | |
| 3682 | - * `type` {string} | ||
| 3682 | + * `type` {string|null} **Default:** `null` | ||
| 3683 | 3683 | * `callback` {Function} | |
| 3684 | 3684 | * `err` {Error} | |
| 3685 | 3685 | ||
@@ -3690,8 +3690,8 @@ See the POSIX symlink(2) documentation for more details. | |||
| 3690 | 3690 | ||
| 3691 | 3691 | The `type` argument is only available on Windows and ignored on other platforms. | |
| 3692 | 3692 | It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is | |
| 3693 | - not set, Node.js will autodetect `target` type and use `'file'` or `'dir'`. If | ||
| 3694 | - the `target` does not exist, `'file'` will be used. Windows junction points | ||
| 3693 | + not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`. | ||
| 3694 | + If the `target` does not exist, `'file'` will be used. Windows junction points | ||
| 3695 | 3695 | require the destination path to be absolute. When using `'junction'`, the | |
| 3696 | 3696 | `target` argument will automatically be normalized to absolute path. | |
| 3697 | 3697 | ||
@@ -4096,9 +4096,9 @@ changes: | |||
| 4096 | 4096 | ||
| 4097 | 4097 | * `fd` {integer} | |
| 4098 | 4098 | * `buffer` {Buffer|TypedArray|DataView} | |
| 4099 | - * `offset` {integer} | ||
| 4100 | - * `length` {integer} | ||
| 4101 | - * `position` {integer} | ||
| 4099 | + * `offset` {integer} **Default:** `0` | ||
| 4100 | + * `length` {integer} **Default:** `buffer.byteLength - offset` | ||
| 4101 | + * `position` {integer|null} **Default:** `null` | ||
| 4102 | 4102 | * `callback` {Function} | |
| 4103 | 4103 | * `err` {Error} | |
| 4104 | 4104 | * `bytesWritten` {integer} | |
@@ -4159,7 +4159,7 @@ changes: | |||
| 4159 | 4159 | ||
| 4160 | 4160 | * `fd` {integer} | |
| 4161 | 4161 | * `string` {string|Object} | |
| 4162 | - * `position` {integer} | ||
| 4162 | + * `position` {integer|null} **Default:** `null` | ||
| 4163 | 4163 | * `encoding` {string} **Default:** `'utf8'` | |
| 4164 | 4164 | * `callback` {Function} | |
| 4165 | 4165 | * `err` {Error} | |
@@ -4348,7 +4348,7 @@ added: v12.9.0 | |||
| 4348 | 4348 | ||
| 4349 | 4349 | * `fd` {integer} | |
| 4350 | 4350 | * `buffers` {ArrayBufferView\[]} | |
| 4351 | - * `position` {integer} | ||
| 4351 | + * `position` {integer|null} **Default:** `null` | ||
| 4352 | 4352 | * `callback` {Function} | |
| 4353 | 4353 | * `err` {Error} | |
| 4354 | 4354 | * `bytesWritten` {integer} | |
@@ -5061,7 +5061,7 @@ object with an `encoding` property specifying the character encoding to use for | |||
| 5061 | 5061 | the link path returned. If the `encoding` is set to `'buffer'`, | |
| 5062 | 5062 | the link path returned will be passed as a {Buffer} object. | |
| 5063 | 5063 | ||
| 5064 | - ### `fs.readSync(fd, buffer, offset, length, position)` | ||
| 5064 | + ### `fs.readSync(fd, buffer, offset, length[, position])` | ||
| 5065 | 5065 | ||
| 5066 | 5066 | <!-- YAML | |
| 5067 | 5067 | added: v0.1.21 | |
@@ -5079,7 +5079,7 @@ changes: | |||
| 5079 | 5079 | * `buffer` {Buffer|TypedArray|DataView} | |
| 5080 | 5080 | * `offset` {integer} | |
| 5081 | 5081 | * `length` {integer} | |
| 5082 | - * `position` {integer|bigint} | ||
| 5082 | + * `position` {integer|bigint|null} **Default:** `null` | ||
| 5083 | 5083 | * Returns: {number} | |
| 5084 | 5084 | ||
| 5085 | 5085 | Returns the number of `bytesRead`. | |
@@ -5107,7 +5107,7 @@ changes: | |||
| 5107 | 5107 | * `options` {Object} | |
| 5108 | 5108 | * `offset` {integer} **Default:** `0` | |
| 5109 | 5109 | * `length` {integer} **Default:** `buffer.byteLength - offset` | |
| 5110 | - * `position` {integer|bigint} **Default:** `null` | ||
| 5110 | + * `position` {integer|bigint|null} **Default:** `null` | ||
| 5111 | 5111 | * Returns: {number} | |
| 5112 | 5112 | ||
| 5113 | 5113 | Returns the number of `bytesRead`. | |
@@ -5128,7 +5128,7 @@ added: | |||
| 5128 | 5128 | ||
| 5129 | 5129 | * `fd` {integer} | |
| 5130 | 5130 | * `buffers` {ArrayBufferView\[]} | |
| 5131 | - * `position` {integer} | ||
| 5131 | + * `position` {integer|null} **Default:** `null` | ||
| 5132 | 5132 | * Returns: {number} The number of bytes read. | |
| 5133 | 5133 | ||
| 5134 | 5134 | For detailed information, see the documentation of the asynchronous version of | |
@@ -5350,7 +5350,7 @@ changes: | |||
| 5350 | 5350 | ||
| 5351 | 5351 | * `target` {string|Buffer|URL} | |
| 5352 | 5352 | * `path` {string|Buffer|URL} | |
| 5353 | - * `type` {string} | ||
| 5353 | + * `type` {string|null} **Default:** `null` | ||
| 5354 | 5354 | ||
| 5355 | 5355 | Returns `undefined`. | |
| 5356 | 5356 | ||
@@ -5482,9 +5482,9 @@ changes: | |||
| 5482 | 5482 | ||
| 5483 | 5483 | * `fd` {integer} | |
| 5484 | 5484 | * `buffer` {Buffer|TypedArray|DataView} | |
| 5485 | - * `offset` {integer} | ||
| 5486 | - * `length` {integer} | ||
| 5487 | - * `position` {integer} | ||
| 5485 | + * `offset` {integer} **Default:** `0` | ||
| 5486 | + * `length` {integer} **Default:** `buffer.byteLength - offset` | ||
| 5487 | + * `position` {integer|null} **Default:** `null` | ||
| 5488 | 5488 | * Returns: {number} The number of bytes written. | |
| 5489 | 5489 | ||
| 5490 | 5490 | For detailed information, see the documentation of the asynchronous version of | |
@@ -5506,8 +5506,8 @@ changes: | |||
| 5506 | 5506 | ||
| 5507 | 5507 | * `fd` {integer} | |
| 5508 | 5508 | * `string` {string} | |
| 5509 | - * `position` {integer} | ||
| 5510 | - * `encoding` {string} | ||
| 5509 | + * `position` {integer|null} **Default:** `null` | ||
| 5510 | + * `encoding` {string} **Default:** `'utf8'` | ||
| 5511 | 5511 | * Returns: {number} The number of bytes written. | |
| 5512 | 5512 | ||
| 5513 | 5513 | For detailed information, see the documentation of the asynchronous version of | |
@@ -5521,7 +5521,7 @@ added: v12.9.0 | |||
| 5521 | 5521 | ||
| 5522 | 5522 | * `fd` {integer} | |
| 5523 | 5523 | * `buffers` {ArrayBufferView\[]} | |
| 5524 | - * `position` {integer} | ||
| 5524 | + * `position` {integer|null} **Default:** `null` | ||
| 5525 | 5525 | * Returns: {number} The number of bytes written. | |
| 5526 | 5526 | ||
| 5527 | 5527 | For detailed information, see the documentation of the asynchronous version of | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -593,7 +593,7 @@ function openSync(path, flags, mode) { | |||
| 593 | 593 | * @param {Buffer | TypedArray | DataView} buffer | |
| 594 | 594 | * @param {number} offset | |
| 595 | 595 | * @param {number} length | |
| 596 | - * @param {number | bigint} position | ||
| 596 | + * @param {number | bigint | null} position | ||
| 597 | 597 | * @param {( | |
| 598 | 598 | * err?: Error, | |
| 599 | 599 | * bytesRead?: number, | |
@@ -678,7 +678,7 @@ ObjectDefineProperty(read, internalUtil.customPromisifyArgs, | |||
| 678 | 678 | * @param {{ | |
| 679 | 679 | * offset?: number; | |
| 680 | 680 | * length?: number; | |
| 681 | - * position?: number | bigint; | ||
| 681 | + * position?: number | bigint | null; | ||
| 682 | 682 | * }} [offset] | |
| 683 | 683 | * @returns {number} | |
| 684 | 684 | */ | |
@@ -734,7 +734,7 @@ function readSync(fd, buffer, offset, length, position) { | |||
| 734 | 734 | * and writes to an array of `ArrayBufferView`s. | |
| 735 | 735 | * @param {number} fd | |
| 736 | 736 | * @param {ArrayBufferView[]} buffers | |
| 737 | - * @param {number} [position] | ||
| 737 | + * @param {number | null} [position] | ||
| 738 | 738 | * @param {( | |
| 739 | 739 | * err?: Error, | |
| 740 | 740 | * bytesRead?: number, | |
@@ -769,7 +769,7 @@ ObjectDefineProperty(readv, internalUtil.customPromisifyArgs, | |||
| 769 | 769 | * of `ArrayBufferView`s. | |
| 770 | 770 | * @param {number} fd | |
| 771 | 771 | * @param {ArrayBufferView[]} buffers | |
| 772 | - * @param {number} [position] | ||
| 772 | + * @param {number | null} [position] | ||
| 773 | 773 | * @returns {number} | |
| 774 | 774 | */ | |
| 775 | 775 | function readvSync(fd, buffers, position) { | |
@@ -792,7 +792,7 @@ function readvSync(fd, buffers, position) { | |||
| 792 | 792 | * @param {Buffer | TypedArray | DataView | string | object} buffer | |
| 793 | 793 | * @param {number} [offset] | |
| 794 | 794 | * @param {number} [length] | |
| 795 | - * @param {number} [position] | ||
| 795 | + * @param {number | null} [position] | ||
| 796 | 796 | * @param {( | |
| 797 | 797 | * err?: Error, | |
| 798 | 798 | * bytesWritten?: number; | |
@@ -857,7 +857,7 @@ ObjectDefineProperty(write, internalUtil.customPromisifyArgs, | |||
| 857 | 857 | * @param {Buffer | TypedArray | DataView | string} buffer | |
| 858 | 858 | * @param {number} [offset] | |
| 859 | 859 | * @param {number} [length] | |
| 860 | - * @param {number} [position] | ||
| 860 | + * @param {number | null} [position] | ||
| 861 | 861 | * @returns {number} | |
| 862 | 862 | */ | |
| 863 | 863 | function writeSync(fd, buffer, offset, length, position) { | |
@@ -895,7 +895,7 @@ function writeSync(fd, buffer, offset, length, position) { | |||
| 895 | 895 | * specified `fd` (file descriptor). | |
| 896 | 896 | * @param {number} fd | |
| 897 | 897 | * @param {ArrayBufferView[]} buffers | |
| 898 | - * @param {number} [position] | ||
| 898 | + * @param {number | null} [position] | ||
| 899 | 899 | * @param {( | |
| 900 | 900 | * err?: Error, | |
| 901 | 901 | * bytesWritten?: number, | |
@@ -936,7 +936,7 @@ ObjectDefineProperty(writev, internalUtil.customPromisifyArgs, { | |||
| 936 | 936 | * to the specified `fd` (file descriptor). | |
| 937 | 937 | * @param {number} fd | |
| 938 | 938 | * @param {ArrayBufferView[]} buffers | |
| 939 | - * @param {number} [position] | ||
| 939 | + * @param {number | null} [position] | ||
| 940 | 940 | * @returns {number} | |
| 941 | 941 | */ | |
| 942 | 942 | function writevSync(fd, buffers, position) { | |
@@ -1594,7 +1594,7 @@ function readlinkSync(path, options) { | |||
| 1594 | 1594 | * Creates the link called `path` pointing to `target`. | |
| 1595 | 1595 | * @param {string | Buffer | URL} target | |
| 1596 | 1596 | * @param {string | Buffer | URL} path | |
| 1597 | - * @param {string} [type_] | ||
| 1597 | + * @param {string | null} [type_] | ||
| 1598 | 1598 | * @param {(err?: Error) => any} callback_ | |
| 1599 | 1599 | * @returns {void} | |
| 1600 | 1600 | */ | |
@@ -1647,7 +1647,7 @@ function symlink(target, path, type_, callback_) { | |||
| 1647 | 1647 | * pointing to `target`. | |
| 1648 | 1648 | * @param {string | Buffer | URL} target | |
| 1649 | 1649 | * @param {string | Buffer | URL} path | |
| 1650 | - * @param {string} [type] | ||
| 1650 | + * @param {string | null} [type] | ||
| 1651 | 1651 | * @returns {void} | |
| 1652 | 1652 | */ | |
| 1653 | 1653 | function symlinkSync(target, path, type) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments