Skip to content

Commit baf99da

Browse files
cjihrigcodebytere
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 98cf55d commit baf99da

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
@@ -3820,6 +3820,9 @@ fs.watch('somedir', (eventType, filename) => {
38203820
<!-- YAML
38213821
added: v0.1.31
38223822
changes:
3823+
- version: v10.5.0
3824+
pr-url: https://github.com/nodejs/node/pull/20220
3825+
description: The `bigint` option is now supported.
38233826
- version: v7.6.0
38243827
pr-url: https://github.com/nodejs/node/pull/10739
38253828
description: The `filename` parameter can be a WHATWG `URL` object using
@@ -3828,6 +3831,7 @@ changes:
38283831

38293832
* `filename` {string|Buffer|URL}
38303833
* `options` {Object}
3834+
* `bigint` {boolean} **Default:** `false`
38313835
* `persistent` {boolean} **Default:** `true`
38323836
* `interval` {integer} **Default:** `5007`
38333837
* `listener` {Function}
@@ -3853,7 +3857,8 @@ fs.watchFile('message.text', (curr, prev) => {
38533857
});
38543858
```
38553859

3856-
These stat objects are instances of `fs.Stat`.
3860+
These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
3861+
the numeric values in these objects are specified as `BigInt`s.
38573862

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

0 commit comments

Comments
 (0)