diff options
author | Rich Trott <rtrott@gmail.com> | 2018-09-26 06:15:54 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-09-26 09:36:06 -0700 |
commit | ddbad37ecbf84a2b816e9dfa2d970a19e9fbf836 (patch) | |
tree | efca1da17d34614ee0825a81e2416f1feba2f8cc /doc | |
parent | 56599a88637c063afff3b998911e1425977d7d3f (diff) | |
download | node-new-ddbad37ecbf84a2b816e9dfa2d970a19e9fbf836.tar.gz |
doc: add links for fs.createWriteStream()
Supply links for fs.createWriteStream() in fs.md.
PR-URL: https://github.com/nodejs/node/pull/23104
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/fs.md | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/api/fs.md b/doc/api/fs.md index 39d499fc5e..68f3611225 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -829,7 +829,7 @@ added: v0.1.93 --> The path to the file the stream is writing to as specified in the first -argument to `fs.createWriteStream()`. If `path` is passed as a string, then +argument to [`fs.createWriteStream()`][]. If `path` is passed as a string, then `writeStream.path` will be a string. If `path` is passed as a `Buffer`, then `writeStream.path` will be a `Buffer`. @@ -3433,7 +3433,8 @@ If this method is invoked as its [`util.promisify()`][]ed version, it returns a `Promise` for an `Object` with `bytesWritten` and `buffer` properties. It is unsafe to use `fs.write()` multiple times on the same file without waiting -for the callback. For this scenario, `fs.createWriteStream()` is recommended. +for the callback. For this scenario, [`fs.createWriteStream()`][] is +recommended. On Linux, positional writes don't work when the file is opened in append mode. 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 [`Buffer.byteLength`][]. It is unsafe to use `fs.write()` multiple times on the same file without waiting -for the callback. For this scenario, `fs.createWriteStream()` is recommended. +for the callback. For this scenario, [`fs.createWriteStream()`][] is +recommended. On Linux, positional writes don't work when the file is opened in append mode. 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); Any specified file descriptor has to support writing. It is unsafe to use `fs.writeFile()` multiple times on the same file without -waiting for the callback. For this scenario, `fs.createWriteStream()` is +waiting for the callback. For this scenario, [`fs.createWriteStream()`][] is recommended. 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). It is unsafe to use `filehandle.write()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). For this -scenario, `fs.createWriteStream` is strongly recommended. +scenario, [`fs.createWriteStream()`][] is strongly recommended. On Linux, positional writes do not work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to @@ -4792,6 +4794,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_flags_callback +[`fs.createWriteStream()`]: #fs_fs_createwritestream_path_options [`fs.exists()`]: fs.html#fs_fs_exists_path_callback [`fs.fstat()`]: #fs_fs_fstat_fd_options_callback [`fs.ftruncate()`]: #fs_fs_ftruncate_fd_len_callback |