MCPcopy
hub / github.com/midrender/revideo / copyDirectory

Function copyDirectory

packages/create/index.js:229–236  ·  view source on GitHub ↗
(src, dest)

Source from the content-addressed store, hash-verified

227}
228
229function copyDirectory(src, dest) {
230 fs.mkdirSync(dest, {recursive: true});
231 for (const file of fs.readdirSync(src)) {
232 const srcFile = path.resolve(src, file);
233 const destFile = path.resolve(dest, file);
234 copy(srcFile, destFile);
235 }
236}
237
238function copy(src, dest) {
239 const stat = fs.statSync(src);

Callers 2

runFunction · 0.85
copyFunction · 0.85

Calls 1

copyFunction · 0.85

Tested by

no test coverage detected