1.0.3 • Published 10 years ago

node-fswatcher v1.0.3

Weekly downloads
9
License
MIT
Repository
github
Last release
10 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

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago