I\'m watching a file in Node.js and would like to obtain the size of the file each time it changes. How can this be done with fs.watchFile?
fs.watchFile
This is what
Use fs.stat in the callback: watchFile just lets you know it changed, it doesn't report the change details.
fs.stat
watchFile