Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ls-stream

chrisdickinson271MIT1.0.0

readable stream of file paths + stat objects

ls, -R, stream

readme

ls-stream

a readable stream of file and directories paths and entries.

var ls = require('ls-stream')

ls('.git')
    .on('data', console.log.bind(console))

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: fs.Stat object }

license

MIT