From 787eccb930d6d6d8fc452d0f5fa870eafdc80fe7 Mon Sep 17 00:00:00 2001 From: RISHABH BUDHIRAJA Date: Wed, 14 Jul 2021 23:25:49 +0530 Subject: [PATCH] doc: changes default values for fs.read fns PR-URL: https://github.com/nodejs/node/pull/39163 Fixes: https://github.com/nodejs/node/issues/39034 Reviewed-By: Nitzan Uziely Reviewed-By: Qingyu Deng --- doc/api/fs.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index ab33a4009730e0..1d1574a5a6e393 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -258,9 +258,7 @@ added: v10.0.0 * `buffer` {Buffer|TypedArray|DataView} A buffer that will be filled with the file data read. * `offset` {integer} The location in the buffer at which to start filling. - **Default:** `0` -* `length` {integer} The number of bytes to read. **Default:** - `buffer.byteLength` +* `length` {integer} The number of bytes to read. * `position` {integer} The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an integer, the current @@ -2836,11 +2834,9 @@ changes: * `fd` {integer} * `buffer` {Buffer|TypedArray|DataView} The buffer that the data will be - written to. **Default:** `Buffer.alloc(16384)` -* `offset` {integer} The position in `buffer` to write the data to. **Default:** - `0` -* `length` {integer} The number of bytes to read. **Default:** - `buffer.byteLength` + written to. +* `offset` {integer} The position in `buffer` to write the data to. +* `length` {integer} The number of bytes to read. * `position` {integer|bigint} Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If `position` is an