0.1.1 • Published 10 years ago

stream-cp v0.1.1

Weekly downloads
5
License
MIT
Repository
github
Last release
10 years ago

stream-cp

NPM version

cp for node.js with stream

Installation

$ npm install stream-cp

Example

var cp = require('./');

cp('test/fixture', 'test/expected', function(file) {
    return 'prefix_' + file;
}, function(err) {
    console.log('done');
});

the example code will bring a result like this:

result

Usage

cp(src, dst, map, callback)

Arguments

  • src: source folder path
  • dst: destnation path
  • map: the function which is used to map the original file names to new filenames.
  • callback: if error occured, it will passed to the callback function.

License

MIT © Leigh Zhu