Skip to content

Commit 2731d08

Browse files
Trotttargos
authored andcommitted
doc: add links for fs.createWriteStream()
Supply links for fs.createWriteStream() in fs.md. PR-URL: #23104 Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 9fa3813 commit 2731d08

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

doc/api/fs.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ added: v0.1.93
829829
-->
830830

831831
The path to the file the stream is writing to as specified in the first
832-
argument to `fs.createWriteStream()`. If `path` is passed as a string, then
832+
argument to [`fs.createWriteStream()`][]. If `path` is passed as a string, then
833833
`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then
834834
`writeStream.path` will be a `Buffer`.
835835

@@ -3428,7 +3428,8 @@ If this method is invoked as its [`util.promisify()`][]ed version, it returns
34283428
a `Promise` for an `Object` with `bytesWritten` and `buffer` properties.
34293429

34303430
It is unsafe to use `fs.write()` multiple times on the same file without waiting
3431-
for the callback. For this scenario, `fs.createWriteStream()` is recommended.
3431+
for the callback. For this scenario, [`fs.createWriteStream()`][] is
3432+
recommended.
34323433

34333434
On Linux, positional writes don't work when the file is opened in append mode.
34343435
The kernel ignores the position argument and always appends the data to
@@ -3475,7 +3476,8 @@ written is not necessarily the same as string characters written. See
34753476
[`Buffer.byteLength`][].
34763477

34773478
It is unsafe to use `fs.write()` multiple times on the same file without waiting
3478-
for the callback. For this scenario, `fs.createWriteStream()` is recommended.
3479+
for the callback. For this scenario, [`fs.createWriteStream()`][] is
3480+
recommended.
34793481

34803482
On Linux, positional writes don't work when the file is opened in append mode.
34813483
The kernel ignores the position argument and always appends the data to
@@ -3536,7 +3538,7 @@ fs.writeFile('message.txt', 'Hello Node.js', 'utf8', callback);
35363538
Any specified file descriptor has to support writing.
35373539

35383540
It is unsafe to use `fs.writeFile()` multiple times on the same file without
3539-
waiting for the callback. For this scenario, `fs.createWriteStream()` is
3541+
waiting for the callback. For this scenario, [`fs.createWriteStream()`][] is
35403542
recommended.
35413543

35423544
If a file descriptor is specified as the `file`, it will not be closed
@@ -3905,7 +3907,7 @@ at the current position. See pwrite(2).
39053907

39063908
It is unsafe to use `filehandle.write()` multiple times on the same file
39073909
without waiting for the `Promise` to be resolved (or rejected). For this
3908-
scenario, `fs.createWriteStream` is strongly recommended.
3910+
scenario, [`fs.createWriteStream()`][] is strongly recommended.
39093911

39103912
On Linux, positional writes do not work when the file is opened in append mode.
39113913
The kernel ignores the position argument and always appends the data to
@@ -4787,6 +4789,7 @@ the file contents.
47874789
[`fs.chmod()`]: #fs_fs_chmod_path_mode_callback
47884790
[`fs.chown()`]: #fs_fs_chown_path_uid_gid_callback
47894791
[`fs.copyFile()`]: #fs_fs_copyfile_src_dest_flags_callback
4792+
[`fs.createWriteStream()`]: #fs_fs_createwritestream_path_options
47904793
[`fs.exists()`]: fs.html#fs_fs_exists_path_callback
47914794
[`fs.fstat()`]: #fs_fs_fstat_fd_options_callback
47924795
[`fs.ftruncate()`]: #fs_fs_ftruncate_fd_len_callback

0 commit comments

Comments
 (0)