Skip to content

Commit a40734a

Browse files
committed
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. Ref: #7868
1 parent 3d54ea4 commit a40734a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/api/fs.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,8 @@ added: v0.0.2
18271827

18281828
Write `buffer` to the file specified by `fd`.
18291829

1830-
`offset` and `length` determine the part of the buffer to be written.
1830+
`offset` determines the part of the buffer to be written, and `length` is
1831+
an integer specifying the number of bytes to write.
18311832

18321833
`position` refers to the offset from the beginning of the file where this data
18331834
should be written. If `typeof position !== 'number'`, the data will be written
@@ -2217,4 +2218,4 @@ The following constants are meant for use with the [`fs.Stats`][] object's
22172218
[`event ports`]: http://illumos.org/man/port_create
22182219
[`ReadDirectoryChangesW`]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v=vs.85%29.aspx
22192220
[`AHAFS`]: https://www.ibm.com/developerworks/aix/library/au-aix_event_infrastructure/
2220-
[Common System Errors]: errors.html#errors_common_system_errors
2221+
[Common System Errors]: errors.html#errors_common_system_errors

0 commit comments

Comments
 (0)