From 5a839b99118d3c8c53ee3694d625882cd27cfa11 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 30 Apr 2018 21:52:05 -0700 Subject: [PATCH] doc: remove unclear text from fs.write() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/nodejs/node/pull/20450 Reviewed-By: Luigi Pinca Reviewed-By: Vse Mozhet Byt Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell --- doc/api/fs.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 61a587dc42ad1c..98b3c0cea26d24 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -3233,10 +3233,6 @@ The callback will receive the arguments `(err, written, string)` where `written` specifies how many _bytes_ the passed string required to be written. Note that bytes written is not the same as string characters. See [`Buffer.byteLength`][]. -Unlike when writing `buffer`, the entire string must be written. No substring -may be specified. This is because the byte offset of the resulting data may not -be the same as the string offset. - Note that it is unsafe to use `fs.write` multiple times on the same file without waiting for the callback. For this scenario, `fs.createWriteStream` is strongly recommended.