npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

ls-stream

1.0.0

@chrisdickinson

npmRepoSnykSocket
Downloads:378
$ npm install ls-stream
DailyWeeklyMonthlyYearly

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