MCPcopy Create free account
hub / github.com/subquery/subql / copyFolderSync

Function copyFolderSync

packages/cli/src/utils/utils.ts:275–290  ·  view source on GitHub ↗
(source: string, target: string)

Source from the content-addressed store, hash-verified

273}
274
275export function copyFolderSync(source: string, target: string): void {
276 if (!fs.existsSync(target)) {
277 fs.mkdirSync(target, {recursive: true});
278 }
279
280 fs.readdirSync(source).forEach((item) => {
281 const sourcePath = path.join(source, item);
282 const targetPath = path.join(target, item);
283
284 if (fs.lstatSync(sourcePath).isDirectory()) {
285 copyFolderSync(sourcePath, targetPath);
286 } else {
287 fs.copyFileSync(sourcePath, targetPath);
288 }
289 });
290}
291
292export function defaultMultiChainYamlManifestPath(projectPath: string): string {
293 return path.join(projectPath, DEFAULT_MULTICHAIN_MANIFEST);

Callers 1

migrateMappingFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected