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

Function write

__tests__/sync-jsx-import-forwarding.test.ts:51–61  ·  view source on GitHub ↗
(dir: string, files: Files)

Source from the content-addressed store, hash-verified

49});
50
51function write(dir: string, files: Files): void {
52 for (const [file, text] of Object.entries(files)) {
53 const full = path.join(dir, file);
54 if (text === null) {
55 fs.rmSync(full, { force: true });
56 continue;
57 }
58 fs.mkdirSync(path.dirname(full), { recursive: true });
59 fs.writeFileSync(full, text);
60 }
61}
62
63/** Every node and edge by natural key, edge metadata included, so two indexes of the same files compare directly. */
64function graphOf(graph: CodeGraph): string[] {

Callers 2

freshGraphFunction · 0.70
indexThenSyncFunction · 0.70

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected