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

Function write

__tests__/go-ref-qualifier.test.ts:383–386  ·  view source on GitHub ↗
(rel: string, content: string)

Source from the content-addressed store, hash-verified

381 it('is read from the file as a sync leaves it', async () => {
382 const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-go-ref-qualifier-sync-'));
383 const write = (rel: string, content: string): void => {
384 fs.mkdirSync(path.dirname(path.join(dir, rel)), { recursive: true });
385 fs.writeFileSync(path.join(dir, rel), content);
386 };
387 write('go.mod', 'module example.com/app\n\ngo 1.22\n');
388 write('auth/jwt.go', files['auth/jwt.go']!);
389 // The same lines either way: a stale reading would still see the local.

Callers 1

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected