0.1.5 • Published 11 years ago

watchdirectory v0.1.5

Weekly downloads
35
License
-
Repository
-
Last release
11 years ago

watchdirectory

Similar to node fs.watchFile but watches a directory recursively and lets you unwatch as well

Purpose

This module provides the ability to recursively watch a directory for changes. Unlike similar modules, this one can unwatch as well.

watchdirectory.watchDirectory(root, options, callback)

The first argument is the directory root you want to watch.

The options object is passed to fs.watchFile but can also be used to provide additional watchDirectory specific options:

  • 'initial' - Defaults to true. If true then we notify the callback of files during initial directory walk.
  • 'recursive' - Defaults to true. Controls the depth of our directory walk.
  • 'filter' - Can be a function or RegExp or string. If it's a string then that will be considered an extension to check. Your callback will only be notified about files that pass your filter.
0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago