Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

atom/node-pathwatcher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Path Watcher Node Module

Installing

npm install pathwatcher

Building

  • Clone the repository
  • Run npm install
  • Run grunt to compile the CoffeeScript and native code
  • Run npm test to run the specs

Using

PathWatcher = 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.

About

Path Watcher Node Module

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 38