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

Function write

__tests__/python-declared-import-roots.test.ts:149–154  ·  view source on GitHub ↗
(root: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

147 let kernel: string | undefined;
148
149 function write(root: string, files: Record<string, string>): void {
150 for (const [rel, content] of Object.entries(files)) {
151 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
152 fs.writeFileSync(path.join(root, rel), content);
153 }
154 }
155
156 async function project(files: Record<string, string>): Promise<CodeGraph> {
157 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-python-declared-roots-'));

Callers 2

projectFunction · 0.70

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected