Skip to content

Commit 5a839b9

Browse files
TrottMylesBorins
authored andcommittedMay 4, 2018
doc: remove unclear text from fs.write()
There is a paragraph explaining that `fs.write()` cannot write a substring of the provided string. It's not clear what `buffer` refers to in that paragraph or even what the purpose of the paragraph is. There's no suggestion elsewhere that `fs.write()` should be expected to have a substring feature. Remove the paragraph. PR-URL: #20450 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 459c20c commit 5a839b9

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed
 

‎doc/api/fs.md

-4
Original file line numberDiff line numberDiff line change
@@ -3233,10 +3233,6 @@ The callback will receive the arguments `(err, written, string)` where `written`
32333233
specifies how many _bytes_ the passed string required to be written. Note that
32343234
bytes written is not the same as string characters. See [`Buffer.byteLength`][].
32353235

3236-
Unlike when writing `buffer`, the entire string must be written. No substring
3237-
may be specified. This is because the byte offset of the resulting data may not
3238-
be the same as the string offset.
3239-
32403236
Note that it is unsafe to use `fs.write` multiple times on the same file
32413237
without waiting for the callback. For this scenario,
32423238
`fs.createWriteStream` is strongly recommended.

0 commit comments

Comments
 (0)
Please sign in to comment.