mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
doc: mention that mode is ignored if file exists
per: https://github.com/joyent/node/issues/6847 Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/joyent/node/pull/25591
This commit is contained in:
1 parent
85bcb281e4
commit
418cde0765
1 file changed
+3
@@ -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});
|
||||
|
||||
Reference in new issue
Block a user