From b65821f4ef6c01a3f193c4c294452d7a5ec728c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Nardi?= Date: Fri, 17 Sep 2021 10:06:44 +0200 Subject: [PATCH] doc: update fs.watchFile doc The current wording suggests to compare Date objects, which won't work. --- doc/api/fs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index e3aa603dc5a870..02fb8dbd2a7f8f 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -3903,7 +3903,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