file-change-watcher

Helps to keep an eye on files(e.g. log files) that are likely to change so to get the content that has been added to tracked files as soon as they're changed.


Keywords
watch, file, change, log, track, content
License
BSD-2-Clause
Install
npm install file-change-watcher@1.0.0

Documentation

file-change-watcher

Installation:

npm install file-change-watcher

Example of usage:

var fcw = require('file-change-watcher')
// ..   
fcw.watchFileChange('test.txt', function(err, data, fileSizeDiff, mtime) {
      console.log('err:', err, // null if no error
                  'data:', data, // content that has been added 
                                 //  to the watched file(null if fileSizeDiff <= 0)
                  'fileSizeDiff:', fileSizeDiff, // difference between current and
                                                 //  past file size
                  'mtime:', mtime); // Modification time
});