Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Commit

Permalink
doc: mention that mode is ignored if file exists
Browse files Browse the repository at this point in the history
per: nodejs#6847

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#25591
  • Loading branch information
jasnell authored and jBarz committed Nov 4, 2016
1 parent e743f1e commit 2a26e83
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 2a26e83

Please sign in to comment.