diff --git a/doc/api/fs.md b/doc/api/fs.md index 0c91ec7b352722..58ea4a3bcd1d4f 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2562,6 +2562,15 @@ v0.10. `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. +*Note:* When a file being watched by `fs.watchFile()` disappears and reappears, +then the `previousStat` reported in the second callback event (the file's +reappearance) will be the same as the `previousStat` of the first callback +event (its disappearance). + +This happens when: +- the file is deleted, followed by a restore +- the file is renamed twice - the second time back to its original name + ## fs.write(fd, buffer[, offset[, length[, position]]], callback)