Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 26, 2024 via pnpm

ncp 2.0.0

Asynchronous recursive file copy utility.
Package summary
Share
0
issues
1
license
1
MIT
Package created
25 Aug 2011
Version published
22 Feb 2015
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
ncp@2.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of ncp 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does ncp do?

The npm package "ncp" functions as an asynchronous recursive file and directory copying utility. It operates on the same principle as the command cp -r, however, it is built entirely on node, and operates asynchronously. It is designed to be utilized both as a Command Line Interface (CLI) tool and programmatically within your codebase.

How do you use ncp?

Utilizing ncp is unexpectedly simple. If you are making use of it from the CLI, your usage would generally follow the format: ncp [source] [dest] [--limit=concurrency limit] [--filter=filter] --stopOnErr. In this instance, 'source' is your source file or directory, 'dest' is your desired end location, and the other flags are optional. Here is a quick summary of the flags:

  • 'filter': This is a Regular Expression and the files that match this expression will be copied.
  • 'concurrency limit': This acts as a limiter to the number of pending filesystem requests ncp has at a time.
  • 'stopOnErr': If this boolean flag is set as true, ncp will stop copying if it encounters any errors.

As a demonstration, you could use ncp programmatically with the following JavaScript code:

var ncp = require('ncp').ncp;
ncp.limit = 16;
ncp(source, destination, function (err) {
 if (err) {
   return console.error(err);
 }
 console.log('done!');
});

In addition, the ncp function accepts an options dictionary as a third argument providing a wider control over the copying process. Available options include 'filter', 'transform', 'clobber', 'dereference', 'stopOnErr' and 'errs'.

Where are the ncp docs?

The comprehensive documentation for the use of ncp can be found on its GitHub page at https://github.com/AvianFlu/ncp. The readme file there will guide you through its installation, configuration, and usage, whether you choose to use it from the command line or programmatically.