MCPcopy Create free account
hub / github.com/MigoXLab/coderio / createFiles

Function createFiles

src/utils/file.ts:24–34  ·  view source on GitHub ↗
({ files, filePath }: { files: FileInfo[]; filePath: string })

Source from the content-addressed store, hash-verified

22 * Create multiple files from parsed data
23 */
24export function createFiles({ files, filePath }: { files: FileInfo[]; filePath: string }): void {
25 try {
26 for (const file of files) {
27 const dirPath = path.dirname(filePath);
28 writeFile(dirPath, file.filename, file.content);
29 }
30 } catch (error) {
31 logger.printErrorLog(`Failed to create files in ${filePath}: ${(error as Error).message}`);
32 throw error;
33 }
34}

Callers 2

saveGeneratedCodeFunction · 0.90
file.test.tsFile · 0.90

Calls 1

writeFileFunction · 0.85

Tested by

no test coverage detected