summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorVladimir Kurchatkin <vladimir.kurchatkin@gmail.com>2015-01-10 23:12:37 +0300
committerBert Belder <bertbelder@gmail.com>2015-01-11 00:46:23 +0100
commit7f9a6c6213763fbc072e4052e7ce13c6c00648e4 (patch)
tree08ad35368627fff5db88a99303e8f032a94e789d /doc
parent0d02515d6eb2d57cb602b3924c950936f9745adc (diff)
downloadnode-new-7f9a6c6213763fbc072e4052e7ce13c6c00648e4.tar.gz
fs: use ES6 octal literals for mode
Update docs, comments and code to use ES6 octal literals instead of decimal + comment. PR-URL: https://github.com/iojs/io.js/pull/281 Reviewed-by: Bert Belder <bertbelder@gmail.com> Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/fs.markdown10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown
index 31a61357e7..cdd62e4b70 100644
--- a/doc/api/fs.markdown
+++ b/doc/api/fs.markdown
@@ -270,7 +270,7 @@ Synchronous rmdir(2).
## fs.mkdir(path[, mode], callback)
Asynchronous mkdir(2). No arguments other than a possible exception are given
-to the completion callback. `mode` defaults to `0777`.
+to the completion callback. `mode` defaults to `0o777`.
## fs.mkdirSync(path[, mode])
@@ -486,7 +486,7 @@ string. Otherwise it returns a buffer.
* `data` {String | Buffer}
* `options` {Object}
* `encoding` {String | Null} default = `'utf8'`
- * `mode` {Number} default = `438` (aka `0666` in Octal)
+ * `mode` {Number} default = `0o666`
* `flag` {String} default = `'w'`
* `callback` {Function}
@@ -513,7 +513,7 @@ The synchronous version of `fs.writeFile`.
* `data` {String | Buffer}
* `options` {Object}
* `encoding` {String | Null} default = `'utf8'`
- * `mode` {Number} default = `438` (aka `0666` in Octal)
+ * `mode` {Number} default = `0o666`
* `flag` {String} default = `'a'`
* `callback` {Function}
@@ -770,7 +770,7 @@ Returns a new ReadStream object (See `Readable Stream`).
{ flags: 'r',
encoding: null,
fd: null,
- mode: 0666,
+ mode: 0o666,
autoClose: true
}
@@ -812,7 +812,7 @@ Returns a new WriteStream object (See `Writable Stream`).
{ flags: 'w',
encoding: null,
fd: null,
- mode: 0666 }
+ mode: 0o666 }
`options` may also include a `start` option to allow writing data at
some position past the beginning of the file. Modifying a file rather