| 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` | |
@@ -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. | |
@@ -3194,7 +3194,7 @@ changes: | |||
| 3194 | 3194 | written to. | |
| 3195 | 3195 | * `offset` {integer} The position in `buffer` to write the data to. | |
| 3196 | 3196 | * `length` {integer} The number of bytes to read. | |
| 3197 | - * `position` {integer|bigint} Specifies where to begin reading from in the | ||
| 3197 | + * `position` {integer|bigint|null} Specifies where to begin reading from in the | ||
| 3198 | 3198 | file. If `position` is `null` or `-1 `, data will be read from the current | |
| 3199 | 3199 | file position, and the file position will be updated. If `position` is an | |
| 3200 | 3200 | integer, the file position will be unchanged. | |
@@ -3233,7 +3233,7 @@ changes: | |||
| 3233 | 3233 | * `buffer` {Buffer|TypedArray|DataView} **Default:** `Buffer.alloc(16384)` | |
| 3234 | 3234 | * `offset` {integer} **Default:** `0` | |
| 3235 | 3235 | * `length` {integer} **Default:** `buffer.byteLength - offset` | |
| 3236 | - * `position` {integer|bigint} **Default:** `null` | ||
| 3236 | + * `position` {integer|bigint|null} **Default:** `null` | ||
| 3237 | 3237 | * `callback` {Function} | |
| 3238 | 3238 | * `err` {Error} | |
| 3239 | 3239 | * `bytesRead` {integer} | |
@@ -3498,7 +3498,7 @@ changes: | |||
| 3498 | 3498 | ||
| 3499 | 3499 | * `fd` {integer} | |
| 3500 | 3500 | * `buffers` {ArrayBufferView\[]} | |
| 3501 | - * `position` {integer} | ||
| 3501 | + * `position` {integer|null} **Default:** `null` | ||
| 3502 | 3502 | * `callback` {Function} | |
| 3503 | 3503 | * `err` {Error} | |
| 3504 | 3504 | * `bytesRead` {integer} | |
@@ -3920,7 +3920,7 @@ changes: | |||
| 3920 | 3920 | ||
| 3921 | 3921 | * `target` {string|Buffer|URL} | |
| 3922 | 3922 | * `path` {string|Buffer|URL} | |
| 3923 | - * `type` {string} | ||
| 3923 | + * `type` {string|null} **Default:** `null` | ||
| 3924 | 3924 | * `callback` {Function} | |
| 3925 | 3925 | * `err` {Error} | |
| 3926 | 3926 | ||
@@ -3931,8 +3931,8 @@ See the POSIX symlink(2) documentation for more details. | |||
| 3931 | 3931 | ||
| 3932 | 3932 | The `type` argument is only available on Windows and ignored on other platforms. | |
| 3933 | 3933 | It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is | |
| 3934 | - not set, Node.js will autodetect `target` type and use `'file'` or `'dir'`. If | ||
| 3935 | - the `target` does not exist, `'file'` will be used. Windows junction points | ||
| 3934 | + not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`. | ||
| 3935 | + If the `target` does not exist, `'file'` will be used. Windows junction points | ||
| 3936 | 3936 | require the destination path to be absolute. When using `'junction'`, the | |
| 3937 | 3937 | `target` argument will automatically be normalized to absolute path. | |
| 3938 | 3938 | ||
@@ -4359,9 +4359,9 @@ changes: | |||
| 4359 | 4359 | ||
| 4360 | 4360 | * `fd` {integer} | |
| 4361 | 4361 | * `buffer` {Buffer|TypedArray|DataView} | |
| 4362 | - * `offset` {integer} | ||
| 4363 | - * `length` {integer} | ||
| 4364 | - * `position` {integer} | ||
| 4362 | + * `offset` {integer} **Default:** `0` | ||
| 4363 | + * `length` {integer} **Default:** `buffer.byteLength - offset` | ||
| 4364 | + * `position` {integer|null} **Default:** `null` | ||
| 4365 | 4365 | * `callback` {Function} | |
| 4366 | 4366 | * `err` {Error} | |
| 4367 | 4367 | * `bytesWritten` {integer} | |
@@ -4422,7 +4422,7 @@ changes: | |||
| 4422 | 4422 | ||
| 4423 | 4423 | * `fd` {integer} | |
| 4424 | 4424 | * `string` {string|Object} | |
| 4425 | - * `position` {integer} | ||
| 4425 | + * `position` {integer|null} **Default:** `null` | ||
| 4426 | 4426 | * `encoding` {string} **Default:** `'utf8'` | |
| 4427 | 4427 | * `callback` {Function} | |
| 4428 | 4428 | * `err` {Error} | |
@@ -4623,7 +4623,7 @@ changes: | |||
| 4623 | 4623 | ||
| 4624 | 4624 | * `fd` {integer} | |
| 4625 | 4625 | * `buffers` {ArrayBufferView\[]} | |
| 4626 | - * `position` {integer} | ||
| 4626 | + * `position` {integer|null} **Default:** `null` | ||
| 4627 | 4627 | * `callback` {Function} | |
| 4628 | 4628 | * `err` {Error} | |
| 4629 | 4629 | * `bytesWritten` {integer} | |
@@ -5338,7 +5338,7 @@ object with an `encoding` property specifying the character encoding to use for | |||
| 5338 | 5338 | the link path returned. If the `encoding` is set to `'buffer'`, | |
| 5339 | 5339 | the link path returned will be passed as a {Buffer} object. | |
| 5340 | 5340 | ||
| 5341 | - ### `fs.readSync(fd, buffer, offset, length, position)` | ||
| 5341 | + ### `fs.readSync(fd, buffer, offset, length[, position])` | ||
| 5342 | 5342 | ||
| 5343 | 5343 | <!-- YAML | |
| 5344 | 5344 | added: v0.1.21 | |
@@ -5356,7 +5356,7 @@ changes: | |||
| 5356 | 5356 | * `buffer` {Buffer|TypedArray|DataView} | |
| 5357 | 5357 | * `offset` {integer} | |
| 5358 | 5358 | * `length` {integer} | |
| 5359 | - * `position` {integer|bigint} | ||
| 5359 | + * `position` {integer|bigint|null} **Default:** `null` | ||
| 5360 | 5360 | * Returns: {number} | |
| 5361 | 5361 | ||
| 5362 | 5362 | Returns the number of `bytesRead`. | |
@@ -5384,7 +5384,7 @@ changes: | |||
| 5384 | 5384 | * `options` {Object} | |
| 5385 | 5385 | * `offset` {integer} **Default:** `0` | |
| 5386 | 5386 | * `length` {integer} **Default:** `buffer.byteLength - offset` | |
| 5387 | - * `position` {integer|bigint} **Default:** `null` | ||
| 5387 | + * `position` {integer|bigint|null} **Default:** `null` | ||
| 5388 | 5388 | * Returns: {number} | |
| 5389 | 5389 | ||
| 5390 | 5390 | Returns the number of `bytesRead`. | |
@@ -5405,7 +5405,7 @@ added: | |||
| 5405 | 5405 | ||
| 5406 | 5406 | * `fd` {integer} | |
| 5407 | 5407 | * `buffers` {ArrayBufferView\[]} | |
| 5408 | - * `position` {integer} | ||
| 5408 | + * `position` {integer|null} **Default:** `null` | ||
| 5409 | 5409 | * Returns: {number} The number of bytes read. | |
| 5410 | 5410 | ||
| 5411 | 5411 | For detailed information, see the documentation of the asynchronous version of | |
@@ -5629,7 +5629,7 @@ changes: | |||
| 5629 | 5629 | ||
| 5630 | 5630 | * `target` {string|Buffer|URL} | |
| 5631 | 5631 | * `path` {string|Buffer|URL} | |
| 5632 | - * `type` {string} | ||
| 5632 | + * `type` {string|null} **Default:** `null` | ||
| 5633 | 5633 | ||
| 5634 | 5634 | Returns `undefined`. | |
| 5635 | 5635 | ||
@@ -5761,9 +5761,9 @@ changes: | |||
| 5761 | 5761 | ||
| 5762 | 5762 | * `fd` {integer} | |
| 5763 | 5763 | * `buffer` {Buffer|TypedArray|DataView} | |
| 5764 | - * `offset` {integer} | ||
| 5765 | - * `length` {integer} | ||
| 5766 | - * `position` {integer} | ||
| 5764 | + * `offset` {integer} **Default:** `0` | ||
| 5765 | + * `length` {integer} **Default:** `buffer.byteLength - offset` | ||
| 5766 | + * `position` {integer|null} **Default:** `null` | ||
| 5767 | 5767 | * Returns: {number} The number of bytes written. | |
| 5768 | 5768 | ||
| 5769 | 5769 | For detailed information, see the documentation of the asynchronous version of | |
@@ -5785,8 +5785,8 @@ changes: | |||
| 5785 | 5785 | ||
| 5786 | 5786 | * `fd` {integer} | |
| 5787 | 5787 | * `string` {string} | |
| 5788 | - * `position` {integer} | ||
| 5789 | - * `encoding` {string} | ||
| 5788 | + * `position` {integer|null} **Default:** `null` | ||
| 5789 | + * `encoding` {string} **Default:** `'utf8'` | ||
| 5790 | 5790 | * Returns: {number} The number of bytes written. | |
| 5791 | 5791 | ||
| 5792 | 5792 | For detailed information, see the documentation of the asynchronous version of | |
@@ -5800,7 +5800,7 @@ added: v12.9.0 | |||
| 5800 | 5800 | ||
| 5801 | 5801 | * `fd` {integer} | |
| 5802 | 5802 | * `buffers` {ArrayBufferView\[]} | |
| 5803 | - * `position` {integer} | ||
| 5803 | + * `position` {integer|null} **Default:** `null` | ||
| 5804 | 5804 | * Returns: {number} The number of bytes written. | |
| 5805 | 5805 | ||
| 5806 | 5806 | For detailed information, see the documentation of the asynchronous version of | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -597,7 +597,7 @@ function openSync(path, flags, mode) { | |||
| 597 | 597 | * @param {Buffer | TypedArray | DataView} buffer | |
| 598 | 598 | * @param {number} offset | |
| 599 | 599 | * @param {number} length | |
| 600 | - * @param {number | bigint} position | ||
| 600 | + * @param {number | bigint | null} position | ||
| 601 | 601 | * @param {( | |
| 602 | 602 | * err?: Error, | |
| 603 | 603 | * bytesRead?: number, | |
@@ -682,7 +682,7 @@ ObjectDefineProperty(read, internalUtil.customPromisifyArgs, | |||
| 682 | 682 | * @param {{ | |
| 683 | 683 | * offset?: number; | |
| 684 | 684 | * length?: number; | |
| 685 | - * position?: number | bigint; | ||
| 685 | + * position?: number | bigint | null; | ||
| 686 | 686 | * }} [offset] | |
| 687 | 687 | * @returns {number} | |
| 688 | 688 | */ | |
@@ -738,7 +738,7 @@ function readSync(fd, buffer, offset, length, position) { | |||
| 738 | 738 | * and writes to an array of `ArrayBufferView`s. | |
| 739 | 739 | * @param {number} fd | |
| 740 | 740 | * @param {ArrayBufferView[]} buffers | |
| 741 | - * @param {number} [position] | ||
| 741 | + * @param {number | null} [position] | ||
| 742 | 742 | * @param {( | |
| 743 | 743 | * err?: Error, | |
| 744 | 744 | * bytesRead?: number, | |
@@ -773,7 +773,7 @@ ObjectDefineProperty(readv, internalUtil.customPromisifyArgs, | |||
| 773 | 773 | * of `ArrayBufferView`s. | |
| 774 | 774 | * @param {number} fd | |
| 775 | 775 | * @param {ArrayBufferView[]} buffers | |
| 776 | - * @param {number} [position] | ||
| 776 | + * @param {number | null} [position] | ||
| 777 | 777 | * @returns {number} | |
| 778 | 778 | */ | |
| 779 | 779 | function readvSync(fd, buffers, position) { | |
@@ -796,7 +796,7 @@ function readvSync(fd, buffers, position) { | |||
| 796 | 796 | * @param {Buffer | TypedArray | DataView | string | object} buffer | |
| 797 | 797 | * @param {number} [offset] | |
| 798 | 798 | * @param {number} [length] | |
| 799 | - * @param {number} [position] | ||
| 799 | + * @param {number | null} [position] | ||
| 800 | 800 | * @param {( | |
| 801 | 801 | * err?: Error, | |
| 802 | 802 | * bytesWritten?: number; | |
@@ -864,7 +864,7 @@ ObjectDefineProperty(write, internalUtil.customPromisifyArgs, | |||
| 864 | 864 | * @param {Buffer | TypedArray | DataView | string} buffer | |
| 865 | 865 | * @param {number} [offset] | |
| 866 | 866 | * @param {number} [length] | |
| 867 | - * @param {number} [position] | ||
| 867 | + * @param {number | null} [position] | ||
| 868 | 868 | * @returns {number} | |
| 869 | 869 | */ | |
| 870 | 870 | function writeSync(fd, buffer, offset, length, position) { | |
@@ -902,7 +902,7 @@ function writeSync(fd, buffer, offset, length, position) { | |||
| 902 | 902 | * specified `fd` (file descriptor). | |
| 903 | 903 | * @param {number} fd | |
| 904 | 904 | * @param {ArrayBufferView[]} buffers | |
| 905 | - * @param {number} [position] | ||
| 905 | + * @param {number | null} [position] | ||
| 906 | 906 | * @param {( | |
| 907 | 907 | * err?: Error, | |
| 908 | 908 | * bytesWritten?: number, | |
@@ -943,7 +943,7 @@ ObjectDefineProperty(writev, internalUtil.customPromisifyArgs, { | |||
| 943 | 943 | * to the specified `fd` (file descriptor). | |
| 944 | 944 | * @param {number} fd | |
| 945 | 945 | * @param {ArrayBufferView[]} buffers | |
| 946 | - * @param {number} [position] | ||
| 946 | + * @param {number | null} [position] | ||
| 947 | 947 | * @returns {number} | |
| 948 | 948 | */ | |
| 949 | 949 | function writevSync(fd, buffers, position) { | |
@@ -1601,7 +1601,7 @@ function readlinkSync(path, options) { | |||
| 1601 | 1601 | * Creates the link called `path` pointing to `target`. | |
| 1602 | 1602 | * @param {string | Buffer | URL} target | |
| 1603 | 1603 | * @param {string | Buffer | URL} path | |
| 1604 | - * @param {string} [type_] | ||
| 1604 | + * @param {string | null} [type_] | ||
| 1605 | 1605 | * @param {(err?: Error) => any} callback_ | |
| 1606 | 1606 | * @returns {void} | |
| 1607 | 1607 | */ | |
@@ -1654,7 +1654,7 @@ function symlink(target, path, type_, callback_) { | |||
| 1654 | 1654 | * pointing to `target`. | |
| 1655 | 1655 | * @param {string | Buffer | URL} target | |
| 1656 | 1656 | * @param {string | Buffer | URL} path | |
| 1657 | - * @param {string} [type] | ||
| 1657 | + * @param {string | null} [type] | ||
| 1658 | 1658 | * @returns {void} | |
| 1659 | 1659 | */ | |
| 1660 | 1660 | function symlinkSync(target, path, type) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments