From 847749fa7c07a0f48a6576a25d601860fde9048e Mon Sep 17 00:00:00 2001 From: LiviaMedeiros Date: Mon, 4 Apr 2022 16:17:11 +0800 Subject: [PATCH] squash: remove "named params" support This is going to be introduced separately --- doc/api/fs.md | 36 -------- lib/fs.js | 17 +--- lib/internal/fs/promises.js | 15 +--- .../test-fs-promises-write-optional-params.js | 87 ------------------- .../test-fs-write-sync-optional-params.js | 82 ----------------- 5 files changed, 5 insertions(+), 232 deletions(-) delete mode 100644 test/parallel/test-fs-promises-write-optional-params.js delete mode 100644 test/parallel/test-fs-write-sync-optional-params.js diff --git a/doc/api/fs.md b/doc/api/fs.md index a67632e721af1c..ab705bbfa1011a 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -619,25 +619,6 @@ On Linux, positional writes do not work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file. -#### `filehandle.write(buffer, options)` - - - -* `buffer` {Buffer|TypedArray|DataView} -* `options` {Object} - * `offset` {integer} **Default:** `0` - * `length` {integer} **Default:** `buffer.byteLength - offset` - * `position` {integer} **Default:** `null` -* Returns: {Promise} - -Write `buffer` to the file. - -Similar to the above `filehandle.write` function, this version takes an -optional `options` object. If no `options` object is specified, it will -default with the above values. - #### `filehandle.write(string[, position[, encoding]])` - -* `fd` {integer} -* `buffer` {Buffer|TypedArray|DataView} -* `options` {Object} - * `offset` {integer} **Default:** `0` - * `length` {integer} **Default:** `buffer.byteLength - offset` - * `position` {integer} **Default:** `null` -* Returns: {number} The number of bytes written. - -For detailed information, see the documentation of the asynchronous version of -this API: [`fs.write(fd, buffer...)`][]. - ### `fs.writeSync(fd, string[, position[, encoding]])`