{"name":"findit","version":"0.0.4","description":"Walk a directory tree.","main":"./index.js","dependencies":{"seq":">=0.1.7"},"repository":{"type":"git","url":"git://github.com/substack/node-findit.git"},"keywords":["find","walk","directory","recursive","tree"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":["node >=0.2.0"],"devDependencies":{},"_id":"findit@0.0.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"a7efad9bdae28ed39f1d9d99a8445360e9dd2496","tarball":"http://registry-npm.ywwl.com/findit/download/findit-0.0.4.tgz","integrity":"sha512-zjFAsw7hTi9wp2gvqP++Jurn+zqwiFXSouB5ariRCDnkQMtl2nHi4WWapvzY0JAvIqMM+RX9pe7DM0NkhFcMdg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBQ2BHfbphJp/2feWZYmvkVTVH4B7/FoxpTJBQt33CnQAiAKjxt+hZduxL+x2xofAxZeR+WqJ1o0x8G7FfbulqlZug=="}],"size":2363,"noattachment":false,"key":"/findit/-/findit-0.0.4.tgz"},"scripts":{},"directories":{},"readme":"# findit\n\nRecursively walk directory trees. Think `/usr/bin/find`.\n\n[![build status](https://secure.travis-ci.org/substack/node-findit.png)](http://travis-ci.org/substack/node-findit)\n\n# example\n\n``` js\nvar finder = require('findit')(process.argv[2] || '.');\nvar path = require('path');\n\nfinder.on('directory', function (dir, stat, stop) {\n    var base = path.basename(dir);\n    if (base === '.git' || base === 'node_modules') stop()\n    else console.log(dir + '/')\n});\n\nfinder.on('file', function (file, stat) {\n    console.log(file);\n});\n\nfinder.on('link', function (link, stat) {\n    console.log(link);\n});\n```\n\n# methods\n\n``` js\nvar find = require('findit')\n```\n\n## var finder = find(basedir, opts)\n\nReturn an event emitter `finder` that performs a recursive walk starting at\n`basedir`.\n\nIf you set `opts.followSymlinks`, symlinks will be followed. Otherwise, a\n`'link'` event will fire but symlinked directories will not be walked.\n\nIf `basedir` is actually a non-directory regular file, findit emits a single\n\"file\" event for it then emits \"end\".\n\nYou can optionally specify a custom\n[fs](http://nodejs.org/docs/latest/api/fs.html)\nimplementation with `opts.fs`. `opts.fs` should implement:\n\n* `opts.fs.readdir(dir, cb)`\n* `opts.fs.lstat(dir, cb)`\n* `opts.fs.readlink(dir, cb)` - optional if your stat objects from\n`opts.fs.lstat` never return true for `stat.isSymbolicLink()`\n\n## finder.stop()\n\nStop the traversal. A `\"stop\"` event will fire and then no more events will\nfire.\n\n# events\n\n## finder.on('path', function (file, stat) {})\n\nFor each file, directory, and symlink `file`, this event fires.\n\n## finder.on('file', function (file, stat) {})\n\nFor each file, this event fires.\n\n## finder.on('directory', function (dir, stat, stop) {})\n\nFor each directory, this event fires with the path `dir`.\n\nYour callback may call `stop()` on the first tick to tell findit to stop walking\nthe current directory.\n\n## finder.on('link', function (file, stat) {})\n\nFor each symlink, this event fires.\n\n## finder.on('readlink', function (src, dst) {})\n\nEvery time a symlink is read when `opts.followSymlinks` is on, this event fires.\n\n## finder.on('end', function () {})\n\nWhen the recursive walk is complete unless `finder.stop()` was called, this\nevent fires.\n\n## finder.on('stop', function () {})\n\nWhen `finder.stop()` is called, this event fires.\n\n## finder.on('error', function (err) {})\n\nWhenever there is an error, this event fires. You can choose to ignore errors or\nstop the traversal using `finder.stop()`.\n\nYou can always get the source of the error by checking `err.path`.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install findit\n```\n\n# license\n\nMIT\n","publish_time":1306546163365,"maintainers":[{"email":"nopersonsmodules@gmail.com","name":"nopersonsmodules"}],"_cnpm_publish_time":1306546163365,"dist-tags":{"latest":"2.0.0"}}