walk-stream

Streaming filesystem walk

Usage no npm install needed!

<script type="module">
  import walkStream from 'https://cdn.skypack.dev/walk-stream';
</script>

README

walk-stream

Recursive filesystem walker for Node.js that implements stream.Readable.

Install

npm install walk-stream

Example

var WalkStream = require('walk-stream').default;
var stream = new WalkStream(process.env.HOME + '/Desktop');
stream.on('data', function(node) {
  console.log(node);
});
stream.on('end', function() {
  console.log('-- DONE --');
});

Alternatives

  • walk: most popular solution; provides synchronous and asynchronous interfaces, based on EventEmitter, lots of options.
  • walk-sync: simple API, synchronous only.

License

Copyright 2014-2015 Christopher Brown. MIT Licensed.