Skip to content

Commit 193d1d0

Browse files
cjihrigrichardlau
authored andcommitted
doc: document fs.watchFile() bigint option
This commit documents the bigint option to fs.watchFile(), which has been supported since v10.5.0. PR-URL: #32128 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 74b00cc commit 193d1d0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/api/fs.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -3369,6 +3369,9 @@ fs.watch('somedir', (eventType, filename) => {
33693369
<!-- YAML
33703370
added: v0.1.31
33713371
changes:
3372+
- version: v10.5.0
3373+
pr-url: https://github.com/nodejs/node/pull/20220
3374+
description: The `bigint` option is now supported.
33723375
- version: v7.6.0
33733376
pr-url: https://github.com/nodejs/node/pull/10739
33743377
description: The `filename` parameter can be a WHATWG `URL` object using
@@ -3377,6 +3380,7 @@ changes:
33773380

33783381
* `filename` {string|Buffer|URL}
33793382
* `options` {Object}
3383+
* `bigint` {boolean} **Default:** `false`
33803384
* `persistent` {boolean} **Default:** `true`
33813385
* `interval` {integer} **Default:** `5007`
33823386
* `listener` {Function}
@@ -3402,7 +3406,8 @@ fs.watchFile('message.text', (curr, prev) => {
34023406
});
34033407
```
34043408

3405-
These stat objects are instances of `fs.Stat`.
3409+
These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
3410+
the numeric values in these objects are specified as `BigInt`s.
34063411

34073412
To be notified when the file was modified, not just accessed, it is necessary
34083413
to compare `curr.mtime` and `prev.mtime`.

0 commit comments

Comments
 (0)