Browse files

doc: clarify the position argument for

What happen to the file position after a read using a position null or
integer was not clear and you can assume that the cursor of the file
descriptor is updated even if position is an integer.

PR-URL: #14631
Fixes: #8397
Reviewed-By: James M Snell <>
Reviewed-By: Colin Ihrig <>
Reviewed-By: Tobias Nießen <>
  • Loading branch information...
dcharbonnier authored and MylesBorins committed Aug 3, 2017
1 parent caeee38 commit 5a7a49f5057bdd308c8e12bb6a18ecc2c9867752
Showing with 3 additions and 1 deletion.
  1. +3 −1 doc/api/
@@ -1309,7 +1309,9 @@ Read data from the file specified by `fd`.
`length` is an integer specifying the number of bytes to read.
`position` is an integer specifying where to begin reading from in the file.
If `position` is `null`, data will be read from the current file position.
If `position` is `null`, data will be read from the current file position,
and the file position will be updated for subsequent reads.
If `position` is an integer, the file position will remain unchanged.
The callback is given the three arguments, `(err, bytesRead, buffer)`.

0 comments on commit 5a7a49f

Please sign in to comment.