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