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

Function copyDir

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

Source from the content-addressed store, hash-verified

321}
322
323async function copyDir(src, dest, opts) {
324 const dir = await opendir(src);
325
326 for await (const { name } of dir) {
327 const srcItem = join(src, name);
328 const destItem = join(dest, name);
329 const { destStat, skipped } = await checkPaths(srcItem, destItem, opts);
330 if (!skipped) await getStatsForCopy(destStat, srcItem, destItem, opts);
331 }
332}
333
334async function onLink(destStat, src, dest, opts) {
335 let resolvedSrc = await readlink(src);

Callers 2

onDirFunction · 0.70
mkDirAndCopyFunction · 0.70

Calls 4

checkPathsFunction · 0.85
getStatsForCopyFunction · 0.85
opendirFunction · 0.50
joinFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…