diff options
author | Clément Nardi <clementnardi@gmail.com> | 2021-09-17 11:06:44 +0300 |
---|---|---|
committer | Node.js GitHub Bot <github-bot@iojs.org> | 2021-09-26 11:36:22 +0300 |
commit | 2b02d2f844439f4a131eae9bc394ec1bd5ba4755 (patch) | |
tree | caec20cf494364643c6f755f73d20caa9e82f5eb /doc/api | |
parent | a2ed30b636becbd6b3d43a28064d4b7a2b0d0e1a (diff) |
doc: update fs.watchFile doc
The current wording suggests to compare Date objects, which won't work.
PR-URL: https://github.com/nodejs/node/pull/40134
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/fs.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/fs.md b/doc/api/fs.md index 9671ce2a11a..3facd3b4b05 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -3990,7 +3990,7 @@ 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`. +to compare `curr.mtimeMs` and `prev.mtimeMs`. When an `fs.watchFile` operation results in an `ENOENT` error, it will invoke the listener once, with all the fields zeroed (or, for dates, the |