Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: document fs.watchFile() bigint option #32128

Merged
merged 1 commit into from
Mar 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3835,6 +3835,9 @@ fs.watch('somedir', (eventType, filename) => {
<!-- YAML
added: v0.1.31
changes:
- version: v10.5.0
pr-url: https://github.com/nodejs/node/pull/20220
description: The `bigint` option is now supported.
- version: v7.6.0
pr-url: https://github.com/nodejs/node/pull/10739
description: The `filename` parameter can be a WHATWG `URL` object using
Expand All @@ -3843,6 +3846,7 @@ changes:

* `filename` {string|Buffer|URL}
* `options` {Object}
* `bigint` {boolean} **Default:** `false`
cjihrig marked this conversation as resolved.
Show resolved Hide resolved
* `persistent` {boolean} **Default:** `true`
* `interval` {integer} **Default:** `5007`
* `listener` {Function}
Expand All @@ -3868,7 +3872,8 @@ fs.watchFile('message.text', (curr, prev) => {
});
```

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

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