stream-concat-files
v0.0.1
Published
Concatenates files using streams
Downloads
4
Readme
stream-concat-files
Concatenates a bunch of files into one new file (or into any writable stream you provide).
Usage
$ npm install stream-concat-files
var concatFiles = require('stream-concat-files');
// Concatenate them into a file
concatFiles(['a.txt', 'b.txt', 'c.txt'], 'concat.txt', function (err) {
if (err) throw err;
// concat.txt is now saved
});
// Or concatenate them into an existing write stream, and don't end it
concatFiles(['a.txt', 'b.txt'], someWritableStream, {end: false}, function (err) {
if (err) throw err;
// someWritableStream has now been written to (but not ended)
});
Options
You can optionally pass in an options object just before the callback.
end
– whether to end the write stream after the last file has been piped into it (default:true
)
Contributing
- run
mocha --watch
while you're working - improvements welcome
License
Copyright (c) 2014 . Licensed under the MIT license.