Skip to content

Commit 9a2b94a

Browse files
clement-narditargos
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 a660017 commit 9a2b94a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/fs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3847,7 +3847,7 @@ These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
38473847
the numeric values in these objects are specified as `BigInt`s.
38483848
38493849
To be notified when the file was modified, not just accessed, it is necessary
3850-
to compare `curr.mtime` and `prev.mtime`.
3850+
to compare `curr.mtimeMs` and `prev.mtimeMs`.
38513851
38523852
When an `fs.watchFile` operation results in an `ENOENT` error, it
38533853
will invoke the listener once, with all the fields zeroed (or, for dates, the

0 commit comments

Comments
 (0)