ls-stream
a readable stream of file and directories paths and entries.
var ls =
API
ls([fs,] directory) -> ls stream
create a readable stream of entry objects.
will start emitting data on next tick unless paused.
users may optionally provide their own fs
object if native fs
is not
available for whatever reason (e.g., in browser).
'data' Entry object
path: "path/to/file-or-dir" stat: fsStat object
Entry.ignore([bool=true]) -> undefined
If called on the same event loop turn as the event is
received, prevents recursing into this directory (or is
a no-op if the entry represents a file). Optionally takes
a single argument which defaults to true
to set the
"ignored" status.
var through = ls =
Warning: As aforementioned, this only works if the entry is ignored on the same event loop turn. For example, the following code would fail to ignore the given entry:
// WARNING: this will not work:
license
MIT