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

Function write

__tests__/rust-receiver-chains.test.ts:27–32  ·  view source on GitHub ↗
(root: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

25const graphs: Record<'issue' | 'chains', CodeGraph> = {} as never;
26
27function write(root: string, files: Record<string, string>): void {
28 for (const [rel, content] of Object.entries(files)) {
29 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
30 fs.writeFileSync(path.join(root, rel), content);
31 }
32}
33
34async function index(name: keyof typeof graphs, files: Record<string, string>): Promise<void> {
35 const root = fs.mkdtempSync(path.join(os.tmpdir(), `cg-rust-chain-${name}-`));

Callers 2

indexFunction · 0.70

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected