{"name":"findit","version":"0.1.2","description":"Walk a directory tree.","main":"./index.js","dependencies":{"seq":">=0.1.7"},"devDependencies":{"hashish":">=0.0.2 <0.1","expresso":"0.7.x"},"scripts":{"test":"expresso"},"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"],"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"findit@0.1.2","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"ac7fe600cd6a32a35672836b74cf6f1dde2e11f8","tarball":"http://registry-npm.ywwl.com/findit/download/findit-0.1.2.tgz","integrity":"sha512-yNTaPnZ6jWWJeCIZHSC2XJp/jWzsl3a59RSpbAJoI0VDzhGCDDV0NUtmp6h+k/gWokINLbudTNgdIW0oJBJwFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRLW4LuzX1K16mLFNj00304vkbXTpcwJYB9oIKvrTlaAIhAIB/+Eqi9pwr2lE9FYzJK3tENO+NSLORDBcLXujY3Hsy"}],"size":3850,"noattachment":false,"key":"/findit/-/findit-0.1.2.tgz"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"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":1323116137960,"_cnpm_publish_time":1323116137960,"dist-tags":{"latest":"2.0.0"}}