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.

Ref: nodejs#7868
  • Loading branch information
jalafel committed Nov 27, 2016
1 parent 3d54ea4 commit a40734a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,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 Expand Up @@ -2217,4 +2218,4 @@ The following constants are meant for use with the [`fs.Stats`][] object's
[`event ports`]: http://illumos.org/man/port_create
[`ReadDirectoryChangesW`]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v=vs.85%29.aspx
[`AHAFS`]: https://www.ibm.com/developerworks/aix/library/au-aix_event_infrastructure/
[Common System Errors]: errors.html#errors_common_system_errors
[Common System Errors]: errors.html#errors_common_system_errors

0 comments on commit a40734a

Please sign in to comment.