lib/watcher.js
function(evt) {
    if (evt !== 'change' && evt !== 'rename') {
      return;
    }
    fs.stat(file, function(err, current) {
      if (err) {
        self.logger_.error(err.message);
        self.emit('error.watch', err.message);
        return;
      }
      if (current.size !== prev.size || +current.mtime > +prev.mtime) {
        prev = current; // save new stats
        self.logger_.debug(util.format('%s has been modified', file));
        self.emit('watch');
      }
    });
  }
function(evt) {
    if (evt !== 'change' && evt !== 'rename') {
      return;
    }
    fs.stat(file, function(err, current) {
      if (err) {
        self.logger_.error(err.message);
        self.emit('error.watch', err.message);
        return;
      }
      if (current.size !== prev.size || +current.mtime > +prev.mtime) {
        prev = current; // save new stats
        self.logger_.debug(util.format('%s has been modified', file));
        self.emit('watch');
      }
    });
  }
function ( evt ) { if ( evt !== 'change' && evt !== 'rename' ) { return ; } fs . stat ( file , function ( err , current ) { if ( err ) { self . logger_ . error ( err . message ) ; self . emit ( 'error.watch' , err . message ) ; return ; } if ( current . size !== prev . size || + current . mtime > + prev . mtime ) { prev = current ; // save new stats self . logger_ . debug ( util . format ( '%s has been modified' , file ) ) ; self . emit ( 'watch' ) ; } } ) ; }
filename is not supported when MacOSX
filename is not supported when MacOSX