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

Function writeProject

__tests__/cpp-global-scope-names.test.ts:19–26  ·  view source on GitHub ↗
(prefix: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

17import { CodeGraph } from '../src';
18
19function writeProject(prefix: string, files: Record<string, string>): string {
20 const root = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
21 for (const [rel, content] of Object.entries(files)) {
22 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
23 fs.writeFileSync(path.join(root, rel), content);
24 }
25 return root;
26}
27
28/**
29 * `name -> target qualified name` for every reference the named function or

Callers 1

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected