diff --git a/README.md b/README.md index 9480032..ad7e62f 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,14 @@ Think `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI ## Command Line usage Usage is simple: `ncp [source] [dest] [--limit=concurrency limit] -[--filter=filter] --stopOnErr` +[--filter=filter] [--dereference] --stopOnErr` The 'filter' is a Regular Expression - matched files will be copied. The 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time. +'dereference' is a boolean flag that will tell `ncp' to follow symbolic links. + 'stoponerr' is a boolean flag that will tell `ncp` to stop immediately if any errors arise, rather than attempting to continue while logging errors. The default behavior is to complete as many copies as possible, logging errors along the way. diff --git a/bin/ncp b/bin/ncp index 388eaba..e4966fa 100755 --- a/bin/ncp +++ b/bin/ncp @@ -8,7 +8,7 @@ var ncp = require('../lib/ncp'), source, dest; if (args.length < 2) { - console.error('Usage: ncp [source] [destination] [--filter=filter] [--limit=concurrency limit]'); + console.error('Usage: ncp [source] [destination] [--dereference] [--filter=filter] [--limit=concurrency limit]'); process.exit(1); } @@ -28,6 +28,9 @@ args.forEach(function (arg) { if (startsWith(arg, "--stoponerr")) { options.stopOnErr = true; } + if (startsWith(arg, "--dereference")) { + options.dereference = true; + } }); ncp.ncp(args[0], args[1], options, function (err) {