MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / write

Function write

__tests__/ambient-module-imports.test.ts:278–283  ·  view source on GitHub ↗
(root: string, files: Files)

Source from the content-addressed store, hash-verified

276type Files = Record<string, string>;
277
278function write(root: string, files: Files): void {
279 for (const [rel, content] of Object.entries(files)) {
280 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
281 fs.writeFileSync(path.join(root, rel), content);
282 }
283}
284
285function tempRoot(): string {
286 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-ambient-modules-'));

Callers 2

fullIndexOfFunction · 0.70

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected