Skip to content

Commit a79b8fa

Browse files
cjihrigMylesBorins
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 1428de8 commit a79b8fa

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
@@ -3840,6 +3840,9 @@ fs.watch('somedir', (eventType, filename) => {
38403840
<!-- YAML
38413841
added: v0.1.31
38423842
changes:
3843+
- version: v10.5.0
3844+
pr-url: https://github.com/nodejs/node/pull/20220
3845+
description: The `bigint` option is now supported.
38433846
- version: v7.6.0
38443847
pr-url: https://github.com/nodejs/node/pull/10739
38453848
description: The `filename` parameter can be a WHATWG `URL` object using
@@ -3848,6 +3851,7 @@ changes:
38483851

38493852
* `filename` {string|Buffer|URL}
38503853
* `options` {Object}
3854+
* `bigint` {boolean} **Default:** `false`
38513855
* `persistent` {boolean} **Default:** `true`
38523856
* `interval` {integer} **Default:** `5007`
38533857
* `listener` {Function}
@@ -3873,7 +3877,8 @@ fs.watchFile('message.text', (curr, prev) => {
38733877
});
38743878
```
38753879

3876-
These stat objects are instances of `fs.Stat`.
3880+
These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
3881+
the numeric values in these objects are specified as `BigInt`s.
38773882

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

0 commit comments

Comments
 (0)