Skip to content

Commit

Permalink
doc: clarifying variables in fs.write()
Browse files Browse the repository at this point in the history
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: nodejs#9792
Ref: nodejs#7868
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
  • Loading branch information
jalafel authored and italoacasas committed Jan 24, 2017
1 parent ae41fcf commit 39f7501
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 39f7501

Please sign in to comment.