Files
node/lib
Livia Medeiros 75302d3dce fs: fix write methods param validation and docs
The FS docs wrongfully indicated support for passing object with an own
`toString` function property to `FileHandle.prototype.appendFile`,
`FileHandle.prototype.writeFile`, `FileHandle.prototype.write`,
`fsPromises.writeFile`, and `fs.writeSync`. This commit fixes that, and
adds some test to ensure the actual behavior is aligned with the docs.
It also fixes a bug that makes the process crash if a non-buffer object
was passed to `FileHandle.prototype.write`.

Refs: https://github.com/nodejs/node/pull/34993
PR-URL: https://github.com/nodejs/node/pull/41677
Refs: https://github.com/nodejs/node/issues/41666
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Backport-PR-URL: https://github.com/nodejs/node/pull/42603
2022-05-01 16:44:20 -05:00
..
2020-02-18 22:15:50 -08:00
2021-08-31 10:55:06 -04:00
2021-09-04 15:14:52 +02:00
2021-05-08 12:44:44 -04:00
2021-09-01 23:24:52 +02:00
2021-06-11 09:30:15 +02:00
2021-09-04 10:03:29 +02:00
2021-09-04 12:45:45 +02:00
2021-07-20 07:11:29 -04:00