recursive-watch

1.1.4 • Public • Published

recursive-watch

Minimal recursive file watcher.

Uses the native recursive fs.watch option on macOS/Windows and basic recursive dir watching on Linux

npm install recursive-watch

Usage

var watch = require('recursive-watch')
 
watch('./a-file-or-directory', function (filename) {
  console.log('something changed with', filename)
})

API

var unwatch = watch(path, onchange)

Watch a directory or filename. Calls the onchange function if the path changed in anyway. Call the unwatch function to stop watching the path.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.4
    49,098
    • latest

Version History

Package Sidebar

Install

npm i recursive-watch

Weekly Downloads

24,919

Version

1.1.4

License

MIT

Unpacked Size

6.09 kB

Total Files

6

Last publish

Collaborators

  • mafintosh