@@ -561,7 +561,7 @@ added: v10.0.0
561561Change the file system timestamps of the object referenced by the {FileHandle}
562562then resolves the promise with no arguments upon success.
563563
564- #### ` filehandle .write (buffer[ , offset[, length[, position] ]])`
564+ #### ` filehandle .write (buffer, offset[, length[, position]])`
565565
566566<!-- YAML
567567added: v10.0.0
@@ -574,7 +574,7 @@ changes:
574574
575575* ` buffer` {Buffer|TypedArray|DataView}
576576* ` offset` {integer} The start position from within ` buffer` where the data
577- to write begins. **Default:** ` 0 `
577+ to write begins.
578578* ` length` {integer} The number of bytes from ` buffer` to write. **Default:**
579579 ` buffer .byteLength - offset`
580580* ` position` {integer|null} The offset from the beginning of the file where the
@@ -599,6 +599,25 @@ On Linux, positional writes do not work when the file is opened in append mode.
599599The kernel ignores the position argument and always appends the data to
600600the end of the file.
601601
602+ #### ` filehandle .write (buffer[, options])`
603+
604+ <!-- YAML
605+ added: REPLACEME
606+ -->
607+
608+ * ` buffer` {Buffer|TypedArray|DataView}
609+ * ` options` {Object}
610+ * ` offset` {integer} **Default:** ` 0 `
611+ * ` length` {integer} **Default:** ` buffer .byteLength - offset`
612+ * ` position` {integer} **Default:** ` null `
613+ * Returns: {Promise}
614+
615+ Write ` buffer` to the file.
616+
617+ Similar to the above ` filehandle .write ` function, this version takes an
618+ optional ` options` object. If no ` options` object is specified, it will
619+ default with the above values.
620+
602621#### ` filehandle .write (string[, position[, encoding]])`
603622
604623<!-- YAML
@@ -4144,7 +4163,7 @@ This happens when:
41444163* the file is deleted, followed by a restore
41454164* the file is renamed and then renamed a second time back to its original name
41464165
4147- ### `fs.write(fd, buffer[ , offset[, length[, position] ]], callback)`
4166+ ### `fs.write(fd, buffer, offset[, length[, position]], callback)`
41484167
41494168<!-- YAML
41504169added: v0.0.2
@@ -4206,6 +4225,29 @@ On Linux, positional writes don't work when the file is opened in append mode.
42064225The kernel ignores the position argument and always appends the data to
42074226the end of the file.
42084227
4228+ ### `fs.write(fd, buffer[, options], callback)`
4229+
4230+ <!-- YAML
4231+ added: REPLACEME
4232+ -->
4233+
4234+ * `fd` {integer}
4235+ * `buffer` {Buffer|TypedArray|DataView}
4236+ * `options` {Object}
4237+ * `offset` {integer} **Default:** `0`
4238+ * `length` {integer} **Default:** `buffer.byteLength - offset`
4239+ * `position` {integer} **Default:** `null`
4240+ * `callback` {Function}
4241+ * `err` {Error}
4242+ * `bytesWritten` {integer}
4243+ * `buffer` {Buffer|TypedArray|DataView}
4244+
4245+ Write `buffer` to the file specified by `fd`.
4246+
4247+ Similar to the above `fs.write` function, this version takes an
4248+ optional `options` object. If no `options` object is specified, it will
4249+ default with the above values.
4250+
42094251### `fs.write(fd, string[, position[, encoding]], callback)`
42104252
42114253<!-- YAML
@@ -5531,7 +5573,7 @@ for more details.
55315573For detailed information, see the documentation of the asynchronous version of
55325574this API: [` fs .writeFile ()` ][].
55335575
5534- ### ` fs .writeSync (fd, buffer[ , offset[, length[, position] ]])`
5576+ ### ` fs .writeSync (fd, buffer, offset[, length[, position]])`
55355577
55365578<!-- YAML
55375579added: v0.1.21
@@ -5562,6 +5604,23 @@ changes:
55625604For detailed information, see the documentation of the asynchronous version of
55635605this API: [` fs .write (fd, buffer... )` ][].
55645606
5607+ ### ` fs .writeSync (fd, buffer[, options])`
5608+
5609+ <!-- YAML
5610+ added: REPLACEME
5611+ -->
5612+
5613+ * ` fd` {integer}
5614+ * ` buffer` {Buffer|TypedArray|DataView}
5615+ * ` options` {Object}
5616+ * ` offset` {integer} **Default:** ` 0 `
5617+ * ` length` {integer} **Default:** ` buffer .byteLength - offset`
5618+ * ` position` {integer} **Default:** ` null `
5619+ * Returns: {number} The number of bytes written.
5620+
5621+ For detailed information, see the documentation of the asynchronous version of
5622+ this API: [` fs .write (fd, buffer... )` ][].
5623+
55655624### ` fs .writeSync (fd, string[, position[, encoding]])`
55665625
55675626<!-- YAML
0 commit comments