Skip to content

Commit

Permalink
doc: mention that mode is ignored if file exists
Browse files Browse the repository at this point in the history
per: nodejs/node-v0.x-archive#6847

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node-v0.x-archive#25591
  • Loading branch information
jasnell committed Aug 4, 2015
1 parent 85bcb28 commit 418cde0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/api/fs.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,9 @@ there's no file descriptor leak. If `autoClose` is set to true (default
behavior), on `error` or `end` the file descriptor will be closed
automatically.

`mode` sets the file mode (permission and sticky bits), but only if the
file was created.

An example to read the last 10 bytes of a file which is 100 bytes long:

fs.createReadStream('sample.txt', {start: 90, end: 99});
Expand Down

0 comments on commit 418cde0

Please sign in to comment.