meteor/node-pathwatcher

Name: node-pathwatcher

Owner: Meteor

Description: Path Watcher Node Module

Created: 2014-11-25 16:14:16.0

Updated: 2014-11-25 16:14:17.0

Pushed: 2015-01-23 02:20:18.0

Homepage: http://atom.github.io/node-pathwatcher

Size: 332

Language: CoffeeScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Path Watcher Node Module Build Status

Installing
install pathwatcher
Building
Using
Watcher = require 'pathwatcher'
PathWatcher.watch(filename, [listener])

Watch for changes on filename, where filename is either a file or a directory. The returned object is a PathWatcher.

The listener callback gets two arguments (event, path). event is 'rename', 'delete' or 'change', and path is the path of the file which triggered the event.

For directories, the 'change' event is emitted when a file or directory under the watched directory got created or deleted. And the PathWatcher.watch is not recursive, so changes of subdirectories under the watched directory would not be detected.

PathWatcher.close()

Stop watching for changes on the given PathWatcher.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.