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

Function write

__tests__/ts-declared-callback-parameters.test.ts:33–39  ·  view source on GitHub ↗
(root: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

31});
32
33function write(root: string, files: Record<string, string>): void {
34 for (const [rel, content] of Object.entries(files)) {
35 const file = path.join(root, rel);
36 fs.mkdirSync(path.dirname(file), { recursive: true });
37 fs.writeFileSync(file, content);
38 }
39}
40
41async function index(files: Record<string, string>): Promise<{ graph: CodeGraph; root: string }> {
42 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-ts-declared-callbacks-'));

Callers 2

indexFunction · 0.70

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected