Skip to content

Commit 1b027ee

Browse files
committed
doc: mention that mode is ignored if file exists
per: nodejs#6847 Reviewed-By: James M Snell <[email protected]> PR-URL: nodejs#25565
1 parent b4a0ca2 commit 1b027ee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/api/fs.markdown

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,9 @@ there's no file descriptor leak. If `autoClose` is set to true (default
797797
behavior), on `error` or `end` the file descriptor will be closed
798798
automatically.
799799

800+
`mode` sets the file mode (permission and sticky bits), but only if the
801+
file was created.
802+
800803
An example to read the last 10 bytes of a file which is 100 bytes long:
801804

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

0 commit comments

Comments
 (0)