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

Function writeTree

__tests__/dart-part-directives.test.ts:19–24  ·  view source on GitHub ↗
(root: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

17import { buildFile } from '../src/ui-server/api/file';
18
19function writeTree(root: string, files: Record<string, string>): void {
20 for (const [rel, content] of Object.entries(files)) {
21 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
22 fs.writeFileSync(path.join(root, rel), content);
23 }
24}
25
26/** `<line> -> <target>` for every `imports` edge out of `file`: a file by its path, anything else by kind, file and name. */
27function importsFrom(cg: CodeGraph, file: string): string[] {

Callers 1

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected