Skip to content

Commit

Permalink
doc: update fs.watchFile doc
Browse files Browse the repository at this point in the history
The current wording suggests to compare Date objects, which won't work.

PR-URL: #40134
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
clement-nardi authored and nodejs-github-bot committed Sep 26, 2021
1 parent a2ed30b commit 2b02d2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b02d2f

Please sign in to comment.