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

Function writeFiles

__tests__/react-router.test.ts:831–836  ·  view source on GitHub ↗
(root: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

829// =============================================================================
830
831function writeFiles(root: string, files: Record<string, string>): void {
832 for (const [rel, content] of Object.entries(files)) {
833 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
834 fs.writeFileSync(path.join(root, rel), content);
835 }
836}
837
838async function indexProject(files: Record<string, string>): Promise<{ root: string; cg: CodeGraph }> {
839 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-rr-tables-'));

Callers 2

indexProjectFunction · 0.70

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected