{"name":"fs-watch-tree","version":"0.2.4","description":"Recursively watch directories for changes","homepage":"http://busterjs.org/doc/fs-watch-tree","author":{"name":"Magnar Sveen"},"contributors":[{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Magnar Sveen","email":"magnars@gmail.com"},{"name":"Stein Magnus Jodal","email":"stein.magnus@jodal.no","url":"http://jodal.no"}],"main":"./lib/fs-watch-tree","repository":{"type":"git","url":"https://github.com/busterjs/fs-watch-tree.git"},"scripts":{"test":"node run-tests.js"},"dependencies":{"when":"https://github.com/cujojs/when/tarball/1.3.0","minimatch":"~0.2"},"devDependencies":{"buster-node":"0.1","rimraf":"*"},"bugs":{"url":"https://github.com/busterjs/fs-watch-tree/issues"},"_id":"fs-watch-tree@0.2.4","dist":{"shasum":"522d693a61919c345dd2c4e2282da9552e4307c4","tarball":"http://registry-npm.ywwl.com/fs-watch-tree/download/fs-watch-tree-0.2.4.tgz","integrity":"sha512-JqANLLOQZm+tOhMzWiI7r+Sc9o4u2j1J30k7BkneHCPgPjsHvUpyuZ17s3RkJmX6we1aL+tChvQRbmlAsDfTNQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5qbZ9FzimOXBZAN5w0Y4mKQRwJgXV20qaEXP9eAfxkwIgQHW2dE4/bIK5g9mYgFK9DatKLIN0ON3H7ZuOM1VexhQ="}],"size":13872,"noattachment":false,"key":"/fs-watch-tree/-/fs-watch-tree-0.2.4.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"dwittner","email":"d.wittner@gmx.de"},"maintainers":[{"name":"cjohansen","email":"christian@cjohansen.no"},{"name":"augustl","email":"august@augustl.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"deprecated":"This package is outdated and not actively maintained.","directories":{},"readme":"# fs-watch-tree #\r\n\r\n**Please note!** This package is outdated and not actively maintained. I would suggest looking at http://github.com/shama/gaze or https://github.com/paulmillr/chokidar.\r\n\r\n-----------------------------\r\n\r\n**fs-watch-tree** is a small tool to watch directories for changes recursively.\r\nIt uses\r\n[fs-watch](http://nodejs.org/docs/latest/api/fs.html#fs_fs_watch_filename_options_listener)\r\nto watch for changes, thus should work on most platforms.\r\n\r\n## Synopsis ##\r\n\r\n    var watchTree = require(\"fs-watch-tree\").watchTree;\r\n\r\n    var watch = watchTree(\"/home/christian\", function (event) {\r\n        // See description of event below\r\n    });\r\n\r\n    watch.end(); // Release watch\r\n\r\n    watch = watchTree(\"/home/christian\", {\r\n        exclude: [\"node_modules\", \"~\", \"#\", /^\\./]\r\n    }, function (event) {\r\n        // Respond to change\r\n    });\r\n\r\n## `watchTree(dir, callback)` ##\r\n\r\nWatches directory `dir` recursively for changes.\r\n\r\nThe callback is called with an `event` object. The event is described below.\r\n\r\n## `watchTree(dir, options, callback)` ##\r\n\r\nWatch a directory recursively, with some specific options. Currently, you can\r\nonly specify a single option:\r\n\r\n    { exclude: [] }\r\n\r\nThe `exclude` array specifies file patterns to exclude from watches. If a\r\npattern matches a directory, `watch-tree` will not recurse into it. If it\r\nmatches a file, changes to that file will not trigger an event.\r\n\r\nThe excludes can be either strings or regular expressions, but are always\r\ntreated as regular expressions. That means that\r\n\r\n    { exclude: [\".git\", \"node_modules\"] }\r\n\r\nWill be treated the same way as:\r\n\r\n    { exclude: [new RegExp(\".git\"), new RegExp(\"node_modules\")] }\r\n\r\nIf you only want to exclude specific files, be sure to provide full\r\npaths. `watch-tree` does not expand paths, it will resolve all paths relative to\r\nthe original directory. So this:\r\n\r\n    watchFile(\".git\", function (event) { /* ... *) });\r\n\r\nWill watch (and consider excludes for) directories like `.git/branches`. And\r\nthis:\r\n\r\n    watchFile(\"/home/christian/projects/watch-tree/.git\", function (event) {});\r\n\r\nWill watch (and consider excludes for) directories like\r\n`/home/christian/projects/watch-tree/.git`.\r\n\r\n## `event` ##\r\n\r\nThe event object has the following properties:\r\n\r\n### `name` ###\r\n\r\nThe full (relative) path to the file/directory that changed.\r\n\r\n### `isDirectory()` ###\r\n\r\nReturns true if the cause of the change was a directory. In some cases,\r\ne.g. when the directory was deleted, it's not possible to know if the\r\nsource was a directory. In that case, this method returns false.\r\n\r\n### `isMkdir()` ###\r\n\r\nReturns true if the cause of the event was a newly created directory.\r\n\r\n### `isDelete()` ###\r\n\r\nReturns true if the cause of the event was a deleted file/directory.\r\n\r\n### `isModify()` ###\r\n\r\nReturns true if the cause of the event was a modified file/directory.\r\n","publish_time":1393598629046,"_cnpm_publish_time":1393598629046,"dist-tags":{"latest":"0.2.5"}}