MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / copyDir

Function copyDir

vmm/ui/build.mjs:140–153  ·  view source on GitHub ↗
(src, dest)

Source from the content-addressed store, hash-verified

138}
139
140async function copyDir(src, dest) {
141 const entries = await fs.readdir(src, { withFileTypes: true });
142 await fs.mkdir(dest, { recursive: true });
143 await Promise.all(
144 entries.map((entry) => {
145 const srcPath = path.join(src, entry.name);
146 const destPath = path.join(dest, entry.name);
147 if (entry.isDirectory()) {
148 return copyDir(srcPath, destPath);
149 }
150 return fs.copyFile(srcPath, destPath);
151 }),
152 );
153}
154
155async function compileProto() {
156 await run('bash', [path.join(ROOT, 'scripts', 'build_proto.sh')]);

Callers 1

compileTypeScriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected