1.0.3 • Published 9 years ago

node-fswatcher v1.0.3

Weekly downloads
9
License
MIT
Repository
github
Last release
9 years ago

Node-FSWatcher

Node-FSWatcher is a super-lightweight watcher that provides a consistent API across platforms along with some cool events.

Usage:

  var
    FSWatcher = require('node-fswatcher');
  let Watcher = FSWatcher.watch("/home/steel/test")
  Watcher.on('addDir', function(Info){
    console.log(Info.Path)
  })

API

enum Events = {
  add, addDir, unlink, unlinkDir, rename,
  change, update, all
}
type InfoShape = shape( Type: String, RawType:String, Name: String, Path: String, StatsOld: ?Object, StatsNew: ?Object )
class Watcher extends EventEmitter{
  Status:Boolean
  constructor(RootPath: String, Recursive: Boolean)
  watch(Path: String)
  unwatch(Path: String)
  close()
  static watch(RootPath: String, ?Callback = Function, Recursive: Boolean)
}

License

This library is licensed under the terms of MIT License. See the License file for more info.

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago