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

Function _copyFile

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

Source from the content-addressed store, hash-verified

258}
259
260async function _copyFile(srcStat, src, dest, opts) {
261 await copyFile(src, dest, opts.mode);
262 if (opts.preserveTimestamps) {
263 return handleTimestampsAndMode(srcStat.mode, src, dest);
264 }
265 return setDestMode(dest, srcStat.mode);
266}
267
268async function handleTimestampsAndMode(srcMode, src, dest) {
269 // Make sure the file is writable before setting the timestamp

Callers 2

onFileFunction · 0.85
mayCopyFileFunction · 0.85

Calls 3

handleTimestampsAndModeFunction · 0.85
copyFileFunction · 0.70
setDestModeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…