From 9a2b94a14218ed74c6df9b2885fc2d0ef2ffd174 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Michaƫl Zasso --- 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 8dfdf2dd66021a..836aa3ef48260b 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -3847,7 +3847,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