Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4a12748

Browse files
committedJun 18, 2017
doc: add default values to function signatures in fs.md
Refs: nodejs#11135
1 parent 81c0045 commit 4a12748

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed
 

‎doc/api/fs.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ changes:
436436
-->
437437

438438
* `path` {string|Buffer|URL}
439-
* `mode` {integer}
439+
* `mode` {integer} default = `fs.constants.F_OK`
440440
* `callback` {Function}
441441

442442
Tests a user's permissions for the file or directory specified by `path`.
@@ -562,7 +562,7 @@ changes:
562562
-->
563563

564564
* `path` {string|Buffer|URL}
565-
* `mode` {integer}
565+
* `mode` {integer} default = `fs.constants.F_OK`
566566

567567
Synchronous version of [`fs.access()`][]. This throws if any accessibility
568568
checks fail, and does nothing otherwise.
@@ -1135,7 +1135,7 @@ added: v0.1.96
11351135

11361136
Synchronous fsync(2). Returns `undefined`.
11371137

1138-
## fs.ftruncate(fd, len, callback)
1138+
## fs.ftruncate(fd[, len], callback)
11391139
<!-- YAML
11401140
added: v0.8.6
11411141
changes:
@@ -1193,7 +1193,7 @@ fs.ftruncate(fd, 10, (err) => {
11931193

11941194
The last three bytes are null bytes ('\0'), to compensate the over-truncation.
11951195

1196-
## fs.ftruncateSync(fd, len)
1196+
## fs.ftruncateSync(fd[, len])
11971197
<!-- YAML
11981198
added: v0.8.6
11991199
-->
@@ -1388,7 +1388,7 @@ changes:
13881388
-->
13891389

13901390
* `path` {string|Buffer|URL}
1391-
* `mode` {integer}
1391+
* `mode` {integer} default = `0o777`
13921392
* `callback` {Function}
13931393

13941394
Asynchronous mkdir(2). No arguments other than a possible exception are given
@@ -1405,7 +1405,7 @@ changes:
14051405
-->
14061406

14071407
* `path` {string|Buffer|URL}
1408-
* `mode` {integer}
1408+
* `mode` {integer} default = `0o777`
14091409

14101410
Synchronous mkdir(2). Returns `undefined`.
14111411

@@ -1506,7 +1506,7 @@ changes:
15061506

15071507
* `path` {string|Buffer|URL}
15081508
* `flags` {string|number}
1509-
* `mode` {integer}
1509+
* `mode` {integer} default = `0o666`
15101510
* `callback` {Function}
15111511

15121512
Asynchronous file open. See open(2). `flags` can be:
@@ -1548,7 +1548,7 @@ The file is created if it does not exist.
15481548
* `'ax+'` - Like `'a+'` but fails if `path` exists.
15491549

15501550
`mode` sets the file mode (permission and sticky bits), but only if the file was
1551-
created. It defaults to `0666`, readable and writable.
1551+
created. It defaults to `0o666`, readable and writable.
15521552

15531553
The callback gets two arguments `(err, fd)`.
15541554

@@ -1595,7 +1595,7 @@ changes:
15951595

15961596
* `path` {string|Buffer|URL}
15971597
* `flags` {string|number}
1598-
* `mode` {integer}
1598+
* `mode` {integer} default = `0o666`
15991599

16001600
Synchronous version of [`fs.open()`][]. Returns an integer representing the file
16011601
descriptor.
@@ -2063,7 +2063,7 @@ changes:
20632063

20642064
* `target` {string|Buffer|URL}
20652065
* `path` {string|Buffer|URL}
2066-
* `type` {string}
2066+
* `type` {string} default = `'file'`
20672067
* `callback` {Function}
20682068

20692069
Asynchronous symlink(2). No arguments other than a possible exception are given
@@ -2094,11 +2094,11 @@ changes:
20942094

20952095
* `target` {string|Buffer|URL}
20962096
* `path` {string|Buffer|URL}
2097-
* `type` {string}
2097+
* `type` {string} default = `'file'`
20982098

20992099
Synchronous symlink(2). Returns `undefined`.
21002100

2101-
## fs.truncate(path, len, callback)
2101+
## fs.truncate(path[, len], callback)
21022102
<!-- YAML
21032103
added: v0.8.6
21042104
changes:
@@ -2116,7 +2116,7 @@ Asynchronous truncate(2). No arguments other than a possible exception are
21162116
given to the completion callback. A file descriptor can also be passed as the
21172117
first argument. In this case, `fs.ftruncate()` is called.
21182118

2119-
## fs.truncateSync(path, len)
2119+
## fs.truncateSync(path[, len])
21202120
<!-- YAML
21212121
added: v0.8.6
21222122
-->
@@ -2167,7 +2167,7 @@ added: v0.1.31
21672167
-->
21682168

21692169
* `filename` {string|Buffer}
2170-
* `listener` {Function}
2170+
* `listener` {Function|undefined} default = `undefined`
21712171

21722172
Stop watching for changes on `filename`. If `listener` is specified, only that
21732173
particular listener is removed. Otherwise, *all* listeners are removed,
@@ -2257,7 +2257,7 @@ changes:
22572257
`false`
22582258
* `encoding` {string} Specifies the character encoding to be used for the
22592259
filename passed to the listener. default = `'utf8'`
2260-
* `listener` {Function}
2260+
* `listener` {Function|undefined} default = `undefined`
22612261

22622262
Watch for changes on `filename`, where `filename` is either a file or a
22632263
directory. The returned object is a [`fs.FSWatcher`][].
@@ -2357,8 +2357,8 @@ changes:
23572357

23582358
* `filename` {string|Buffer|URL}
23592359
* `options` {Object}
2360-
* `persistent` {boolean}
2361-
* `interval` {integer}
2360+
* `persistent` {boolean} default = `true`
2361+
* `interval` {integer} default = `5007`
23622362
* `listener` {Function}
23632363

23642364
Watch for changes on `filename`. The callback `listener` will be called each

0 commit comments

Comments
 (0)
Please sign in to comment.