From 1b027eedb9316aa761d9dba6d94a3915875a3dfb Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 23 Jun 2015 20:59:56 -0700 Subject: [PATCH] doc: mention that mode is ignored if file exists per: https://github.com/joyent/node/issues/6847 Reviewed-By: James M Snell PR-URL: https://github.com/joyent/node/pull/25565 --- doc/api/fs.markdown | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 4c0f9bf7e8e..6898a9e1bde 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -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});