{"name":"fs-watch-tree","version":"0.2.2","description":"Recursively watch directories for changes","homepage":"http://busterjs.org/doc/fs-watch-tree","author":{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},"contributors":[{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Magnar Sveen","email":"magnars@gmail.com"}],"main":"./lib/fs-watch-tree","repository":{"type":"git","url":"git://github.com/busterjs/fs-watch-tree.git"},"scripts":{"test":"./node_modules/buster/bin/buster-test"},"dependencies":{"when":"https://github.com/cujojs/when/tarball/1.3.0"},"devDependencies":{"buster":"*","rimraf":"*"},"_npmUser":{"name":"cjohansen","email":"christian@cjohansen.no"},"_id":"fs-watch-tree@0.2.2","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.6.5","_defaultsLoaded":true,"dist":{"shasum":"ded130c1e9b0dde46ff11e6c4b21a6ba06dd65ad","tarball":"http://registry-npm.ywwl.com/fs-watch-tree/download/fs-watch-tree-0.2.2.tgz","integrity":"sha512-nRp/nOBRSTcKcllj3kdwsAg/O6N387NloBk6hLMTTQ8NeRRlNYgYUvAW29WmQYv/FUDZNl+AMus8H29m3sSFDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfVTxN/jSiO7tcGvtL+ECCKSCjBy3Fywt6eK9zpvNi4gIgaHEGB5+amQmZC8O3Gnbf9kvYAHY2jIT/FOXduxK5FdA="}],"size":11373,"noattachment":false,"key":"/fs-watch-tree/-/fs-watch-tree-0.2.2.tgz"},"maintainers":[{"name":"cjohansen","email":"christian@cjohansen.no"},{"name":"augustl","email":"august@augustl.com"}],"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":1341873021878,"_cnpm_publish_time":1341873021878,"dist-tags":{"latest":"0.2.5"}}