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

Function cpFn

lib/internal/fs/cp/cp.js:59–71  ·  view source on GitHub ↗
(src, dest, opts)

Source from the content-addressed store, hash-verified

57const fsBinding = internalBinding('fs');
58
59async function cpFn(src, dest, opts) {
60 // Warn about using preserveTimestamps on 32-bit node
61 if (opts.preserveTimestamps && process.arch === 'ia32') {
62 const warning = 'Using the preserveTimestamps option in 32-bit ' +
63 'node is not recommended';
64 process.emitWarning(warning, 'TimestampPrecisionWarning');
65 }
66 const stats = await checkPaths(src, dest, opts);
67 const { srcStat, destStat, skipped } = stats;
68 if (skipped) return;
69 await checkParentPaths(src, srcStat, dest);
70 return checkParentDir(destStat, src, dest, opts);
71}
72
73async function checkPaths(src, dest, opts) {
74 if (opts.filter && !(await opts.filter(src, dest))) {

Callers 1

cpFunction · 0.85

Calls 3

checkPathsFunction · 0.85
checkParentPathsFunction · 0.85
checkParentDirFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…