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

Function writeFile

src/utils/file.ts:11–19  ·  view source on GitHub ↗
(folderPath: string, filePath: string, content: string)

Source from the content-addressed store, hash-verified

9 * @param content - The content to write to the file
10 */
11export const writeFile = (folderPath: string, filePath: string, content: string) => {
12 if (!folderPath || !filePath || !content) {
13 return;
14 }
15 if (!fs.existsSync(folderPath)) {
16 fs.mkdirSync(folderPath, { recursive: true });
17 }
18 fs.writeFileSync(path.join(folderPath, filePath), content);
19};
20
21/**
22 * Create multiple files from parsed data

Callers 8

saveDebugLogFunction · 0.90
callModelFunction · 0.90
generateProtocolFunction · 0.90
saveGeneratedCodeFunction · 0.90
injectRootComponentToAppFunction · 0.90
file.test.tsFile · 0.90
createFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected