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: #9792
Ref: #7868
Reviewed-By: Sam Roberts <[email protected]>
  • Loading branch information
jalafel authored and italoacasas committed Jan 27, 2017
1 parent daf1bf5 commit 520b1f7
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 520b1f7

Please sign in to comment.