MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / writeAllFiles

Method writeAllFiles

lib/base-compiler.ts:2088–2101  ·  view source on GitHub ↗
(dirPath: string, source: string, files: FiledataPair[])

Source from the content-addressed store, hash-verified

2086 }
2087
2088 protected async writeAllFiles(dirPath: string, source: string, files: FiledataPair[]) {
2089 if (!source) throw new Error(`File ${this.compileFilename} has no content or file is missing`);
2090
2091 const inputFilename = path.join(dirPath, this.compileFilename);
2092 await fs.writeFile(inputFilename, source);
2093
2094 if (files && files.length > 0) {
2095 await this.writeMultipleFiles(files, dirPath);
2096 }
2097
2098 return {
2099 inputFilename,
2100 };
2101 }
2102
2103 protected async writeAllFilesCMake(
2104 dirPath: string,

Callers 3

compileMethod · 0.95
pascal-tests.tsFile · 0.45

Calls 1

writeMultipleFilesMethod · 0.95

Tested by

no test coverage detected