Skip to content

Watching `file`, `dir` or `link` changing, using interval timer.

License

Notifications You must be signed in to change notification settings

node-modules/changing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

changing

NPM version build status Test coverage Gittip David deps npm download

Watching file, dir or link changing, using interval timer.

Installation

$ npm install changing --save

Usage

var changing = require('changing');

var watcher = changing({
  interval: '10s'
});

watcher.add(path1);
watcher.add(path2);

watcher.on('change', function (info) {
  console.log(info);
  // { event: 'change',
  // path: '/Users/mk2/git/changing/test/fixtures/foo.js',
  // stat:
  //  { dev: 16777220,
  //    mode: 33188,
  //    nlink: 1,
  //    uid: 501,
  //    gid: 20,
  //    rdev: 0,
  //    blksize: 4096,
  //    ino: 72656587,
  //    size: 11,
  //    blocks: 8,
  //    atime: Wed Jun 17 2015 00:08:11 GMT+0800 (CST),
  //    mtime: Wed Jun 17 2015 00:08:38 GMT+0800 (CST),
  //    ctime: Wed Jun 17 2015 00:08:38 GMT+0800 (CST),
  //    birthtime: Tue Jun 16 2015 23:19:13 GMT+0800 (CST) } }
});

License

MIT

About

Watching `file`, `dir` or `link` changing, using interval timer.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •