glob-filestream
Reads a glob of files into a single stream.
Install
npm install --save glob-filestream
Usage
Pass in a glob or array of globs, and get all of the matched content in one stream.
var globfile = ; var stream = ; // read like a regular filestream var data = ; stream; stream;
Files will be read and piped as-is, but sometimes, you may want to separate individual files with a new line. You can use the options for that, as such:
var stream = ;
Every once in a while, you might find the need to transform individual files as you read them. There is an option for that as well.
var globfile = ;var ensureGunzip = ; var stream = ; // read `stream`, containing all plain text files
Transform is a function that takes a stream
as a parameter and returns a new stream. The identify transform function would look like this:
{ return stream;}