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

Function getStats

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

Source from the content-addressed store, hash-verified

125}
126
127function getStats(src, dest, opts) {
128 const statFunc = opts.dereference ?
129 (file) => stat(file, { bigint: true }) :
130 (file) => lstat(file, { bigint: true });
131 return SafePromiseAll([
132 statFunc(src),
133 PromisePrototypeThen(statFunc(dest), undefined, (err) => {
134 if (err.code === 'ENOENT') return null;
135 throw err;
136 }),
137 ]);
138}
139
140async function checkParentDir(destStat, src, dest, opts) {
141 const destParent = dirname(dest);

Callers 1

checkPathsFunction · 0.70

Calls 2

statFunction · 0.50
lstatFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…