MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / copyTree

Function copyTree

scripts/run-javascript-lifecycle-tests.mjs:114–127  ·  view source on GitHub ↗
(src, dst)

Source from the content-addressed store, hash-verified

112}
113
114function copyTree(src, dst) {
115 fs.mkdirSync(dst, { recursive: true });
116 for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
117 const sp = path.join(src, entry.name);
118 const dp = path.join(dst, entry.name);
119 if (entry.isDirectory()) {
120 copyTree(sp, dp);
121 } else if (entry.isSymbolicLink()) {
122 fs.symlinkSync(fs.readlinkSync(sp), dp);
123 } else {
124 fs.copyFileSync(sp, dp);
125 }
126 }
127}
128
129/**
130 * Inject the harness server's log-capture probe (the same shim

Callers 2

materializeBundleFunction · 0.85
runBundleFunction · 0.85

Calls 2

joinMethod · 0.65
isDirectoryMethod · 0.45

Tested by

no test coverage detected