Skip to content

Commit 2b02d2f

Browse files
clement-nardinodejs-github-bot
authored andcommitted
doc: update fs.watchFile doc
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]>
1 parent a2ed30b commit 2b02d2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/fs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3990,7 +3990,7 @@ These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
39903990
the numeric values in these objects are specified as `BigInt`s.
39913991
39923992
To be notified when the file was modified, not just accessed, it is necessary
3993-
to compare `curr.mtime` and `prev.mtime`.
3993+
to compare `curr.mtimeMs` and `prev.mtimeMs`.
39943994
39953995
When an `fs.watchFile` operation results in an `ENOENT` error, it
39963996
will invoke the listener once, with all the fields zeroed (or, for dates, the

0 commit comments

Comments
 (0)