UNPKG

811 BMarkdownView Raw
1# ncp - Asynchronous recursive file & directory copying
2
3Think `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically.
4
5## Command Line usage
6
7Usage is simple: `ncp [source] [dest] [concurrency limit]`
8
9The 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time.
10
11If there are no errors, `ncp` will output `done.` when complete.
12
13## Programmatic usage
14
15Programmatic usage of `ncp` is just as simple.
16
17```javascript
18var ncp = require('ncp').ncp;
19
20ncp.limit = 16;
21
22ncp(source, destination, function (err) {
23 if (err) {
24 return console.error(err);
25 }
26 console.log('done!');
27});
28```
29
30Please open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`.