doc: specify how fs.WriteStream/ReadStreams are created

Alternative to https://github.com/nodejs/node/pull/33841

Co-authored-by: zombieleet <zombieleetnca@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/34188
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
James M Snell
2020-07-03 13:03:56 -07:00
parent 1b1e985478
commit e7dadd376e

View File

@@ -654,8 +654,8 @@ added: v0.1.93
* Extends: {stream.Readable}
A successful call to `fs.createReadStream()` will return a new `fs.ReadStream`
object.
Instances of `fs.ReadStream` are created and returned using the
[`fs.createReadStream()`][] function.
### Event: `'close'`
<!-- YAML
@@ -1079,6 +1079,9 @@ added: v0.1.93
* Extends {stream.Writable}
Instances of `fs.WriteStream` are created and returned using the
[`fs.createWriteStream()`][] function.
### Event: `'close'`
<!-- YAML
added: v0.1.93
@@ -5898,6 +5901,7 @@ the file contents.
[`fs.chmod()`]: #fs_fs_chmod_path_mode_callback
[`fs.chown()`]: #fs_fs_chown_path_uid_gid_callback
[`fs.copyFile()`]: #fs_fs_copyfile_src_dest_mode_callback
[`fs.createReadStream()`]: #fs_fs_createreadstream_path_options
[`fs.createWriteStream()`]: #fs_fs_createwritestream_path_options
[`fs.exists()`]: fs.html#fs_fs_exists_path_callback
[`fs.fstat()`]: #fs_fs_fstat_fd_options_callback