From 9b399734fed347b56e90d34e24f2b1b2e79ddab4 Mon Sep 17 00:00:00 2001 From: Jessica Quynh Tran Date: Thu, 24 Nov 2016 18:35:15 -0500 Subject: [PATCH] doc: clarifying variables in fs.write() This commit clarifies variables in the Filesystem docs. Prior, the documentation for fs.write() had an ambiguous remark on the parameters of offset and length. Therefore, this commit makes explicit that the length parameter in fs.write() is used to denote the number of bytes, which is a clearer reference for its usage. PR-URL: https://github.com/nodejs/node/pull/9792 Ref: https://github.com/nodejs/node/issues/7868 Reviewed-By: Sam Roberts --- doc/api/fs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 490e1269d23848..5471c5f5e646f5 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1832,7 +1832,8 @@ added: v0.0.2 Write `buffer` to the file specified by `fd`. -`offset` and `length` determine the part of the buffer to be written. +`offset` determines the part of the buffer to be written, and `length` is +an integer specifying the number of bytes to write. `position` refers to the offset from the beginning of the file where this data should be written. If `typeof position !== 'number'`, the data will be written