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
var fs = require('fs'); fs.watchFile('some.file', function () { fs.stat('some.file', function (err, stats) { console.log(stats.size); }); });