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

Function write

__tests__/const-alias-flow.test.ts:26–31  ·  view source on GitHub ↗
(root: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

24});
25
26function write(root: string, files: Record<string, string>): void {
27 for (const [rel, content] of Object.entries(files)) {
28 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
29 fs.writeFileSync(path.join(root, rel), content);
30 }
31}
32
33async function indexProject(files: Record<string, string>): Promise<{ cg: CodeGraph; root: string }> {
34 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-const-alias-'));

Callers 2

indexProjectFunction · 0.70

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected