MCPcopy Index your code
hub / github.com/nodejs/node / cp

Function cp

lib/fs.js:3690–3701  ·  view source on GitHub ↗

* Asynchronously copies `src` to `dest`. `src` can be a file, directory, or * symlink. The contents of directories will be copied recursively. * @param {string | URL} src * @param {string | URL} dest * @param {object} [options] * @param {(err?: Error) => any} callback * @returns {void}

(src, dest, options, callback)

Source from the content-addressed store, hash-verified

3688 * @returns {void}
3689 */
3690function cp(src, dest, options, callback) {
3691 if (typeof options === 'function') {
3692 callback = options;
3693 options = undefined;
3694 }
3695 callback = makeCallback(callback);
3696 options = validateCpOptions(options);
3697 src = getValidatedPath(src, 'src');
3698 dest = getValidatedPath(dest, 'dest');
3699 lazyLoadCp();
3700 cpFn(src, dest, options, callback);
3701}
3702
3703/**
3704 * Synchronously copies `src` to `dest`. `src` can be a file, directory, or

Calls 3

lazyLoadCpFunction · 0.85
cpFnFunction · 0.85
makeCallbackFunction · 0.70

Tested by

no test coverage detected