Recursively walk directory trees. Think
var finder = processargv2 || '.';var path = ;finder;finder;finder;
var find =
Return an event emitter
finder that performs a recursive walk starting at
If you set
opts.followSymlinks, symlinks will be followed. Otherwise, a
'link' event will fire but symlinked directories will not be walked.
basedir is actually a non-directory regular file, findit emits a single
"file" event for it then emits "end".
You can optionally specify a custom
opts.fs should implement:
opts.fs.readlink(dir, cb)- optional if your stat objects from
opts.fs.lstatnever return true for
Stop the traversal. A
"stop" event will fire and then no more events will
For each file, directory, and symlink
file, this event fires.
For each file, this event fires.
For each directory, this event fires with the path
Your callback may call
stop() on the first tick to tell findit to stop walking
the current directory.
For each symlink, this event fires.
Every time a symlink is read when
opts.followSymlinks is on, this event fires.
When the recursive walk is complete unless
finder.stop() was called, this
finder.stop() is called, this event fires.
Whenever there is an error, this event fires. You can choose to ignore errors or
stop the traversal using
You can always get the source of the error by checking
With npm do:
npm install findit