summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2015-06-23 20:59:56 -0700
committerJames M Snell <jasnell@gmail.com>2015-08-03 20:44:38 -0700
commit418cde076549a8d5197755cef451b3d845f21d5e (patch)
tree208ff27a3c263a992cea96b56c89dbf4223d10db
parent85bcb281e482cda82c49f4d81981d654017b8f23 (diff)
downloadnode-418cde076549a8d5197755cef451b3d845f21d5e.tar.gz
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
-rw-r--r--doc/api/fs.markdown3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown
index 4c0f9bf7e..6898a9e1b 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});