Skip to content

Commit ddbad37

Browse files
committed
doc: add links for fs.createWriteStream()
Supply links for fs.createWriteStream() in fs.md. PR-URL: nodejs#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 56599a8 commit ddbad37

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

doc/api/fs.md

Lines changed: 8 additions & 5 deletions
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

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

34353435
It is unsafe to use `fs.write()` multiple times on the same file without waiting
3436-
for the callback. For this scenario, `fs.createWriteStream()` is recommended.
3436+
for the callback. For this scenario, [`fs.createWriteStream()`][] is
3437+
recommended.
34373438

34383439
On Linux, positional writes don't work when the file is opened in append mode.
34393440
The kernel ignores the position argument and always appends the data to
@@ -3480,7 +3481,8 @@ written is not necessarily the same as string characters written. See
34803481
[`Buffer.byteLength`][].
34813482

34823483
It is unsafe to use `fs.write()` multiple times on the same file without waiting
3483-
for the callback. For this scenario, `fs.createWriteStream()` is recommended.
3484+
for the callback. For this scenario, [`fs.createWriteStream()`][] is
3485+
recommended.
34843486

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

35433545
It is unsafe to use `fs.writeFile()` multiple times on the same file without
3544-
waiting for the callback. For this scenario, `fs.createWriteStream()` is
3546+
waiting for the callback. For this scenario, [`fs.createWriteStream()`][] is
35453547
recommended.
35463548

35473549
If a file descriptor is specified as the `file`, it will not be closed
@@ -3910,7 +3912,7 @@ at the current position. See pwrite(2).
39103912

39113913
It is unsafe to use `filehandle.write()` multiple times on the same file
39123914
without waiting for the `Promise` to be resolved (or rejected). For this
3913-
scenario, `fs.createWriteStream` is strongly recommended.
3915+
scenario, [`fs.createWriteStream()`][] is strongly recommended.
39143916

39153917
On Linux, positional writes do not work when the file is opened in append mode.
39163918
The kernel ignores the position argument and always appends the data to
@@ -4792,6 +4794,7 @@ the file contents.
47924794
[`fs.chmod()`]: #fs_fs_chmod_path_mode_callback
47934795
[`fs.chown()`]: #fs_fs_chown_path_uid_gid_callback
47944796
[`fs.copyFile()`]: #fs_fs_copyfile_src_dest_flags_callback
4797+
[`fs.createWriteStream()`]: #fs_fs_createwritestream_path_options
47954798
[`fs.exists()`]: fs.html#fs_fs_exists_path_callback
47964799
[`fs.fstat()`]: #fs_fs_fstat_fd_options_callback
47974800
[`fs.ftruncate()`]: #fs_fs_ftruncate_fd_len_callback

0 commit comments

Comments
 (0)