MCPcopy Create free account
hub / github.com/different-ai/opencode-browser / copyDirRecursive

Function copyDirRecursive

bin/cli.js:261–276  ·  view source on GitHub ↗
(srcDir, destDir)

Source from the content-addressed store, hash-verified

259}
260
261function copyDirRecursive(srcDir, destDir) {
262 ensureDir(destDir);
263 const entries = readdirSync(srcDir, { recursive: true });
264 for (const entry of entries) {
265 const srcPath = join(srcDir, entry);
266 const destPath = join(destDir, entry);
267
268 try {
269 readdirSync(srcPath);
270 ensureDir(destPath);
271 } catch {
272 ensureDir(dirname(destPath));
273 copyFileSync(srcPath, destPath);
274 }
275 }
276}
277
278function getNativeHostDirs(osName) {
279 if (osName === "darwin") {

Callers 2

installFunction · 0.85
updateFunction · 0.85

Calls 1

ensureDirFunction · 0.85

Tested by

no test coverage detected