watch_r-structr-lock

0.0.1 • Public • Published

Features

  • recursively watch files
  • watch new dirs/files that have been added to any watched directory
  • ability to ignore files with .ignorewatch including list of files to ignore (similar to .gitignore). Use * to ignore all files in .ignorewatch directory.

Installation

npm install watch_r

Example

  
var watch_r = require('watch_r');
 
watch_r('/path/to/file', function(err, watcher) {
     
    //add / change
    watcher.on('change', function(target) {
        
        //changed file
        console.log(target.path);
    })
    
    watcher.on('remove', function(target) {
        
        //removed file
        console.log(target.path);
    });
})
 

Dependencies (6)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i watch_r-structr-lock

    Weekly Downloads

    3,807

    Version

    0.0.1

    License

    none

    Last publish

    Collaborators

    • dustin.tinney
    • mike.testdouble
    • searls