Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

directory-tree-watcher

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

directory-tree-watcher

Using the fs.watch(..) command to keep track of changes in directory trees

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

directory-tree-watcher

Extend the functionality of fs.watch(filename, [options], listener) to subdirectories.

Example usage:

var watch = require("directory-tree-watcher");

watch(".", function(event, file) {
    console.log("watcher:", event, file);
});

watch(directory, [options,] listener, callback)

Watches a directory and all sub-directories. options are the same as for fs.watch(filename, [options], listener). The listener is also passed to fs.watch(filename, [options], listener). The callback is passed two parameters. The first parameter is an error (if any). The second parameter of the callback a Watcher object, which responds to a close() method, which closes the watcher.

Testing

Install jake: npm install -g jake

Note that Jake is a system-level tool, and wants to be installed globally.

To execute tests execute: jake test

License

MIT License. View it at LICENSE file.

Keywords

watch

FAQs

Package last updated on 28 Jun 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts