This package has been deprecated

Author message:

Use chokidar instead

node-fswatcher

1.0.3 • Public • Published

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.

Package Sidebar

Install

npm i node-fswatcher

Weekly Downloads

0

Version

1.0.3

License

MIT

Last publish

Collaborators

  • steelbrain