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

Function put

__tests__/sync-navigation-retry.test.ts:447–450  ·  view source on GitHub ↗

Set a file's content, or remove the file for null.

(root: string, rel: string, content: string | null)

Source from the content-addressed store, hash-verified

445
446/** Set a file's content, or remove the file for null. */
447function put(root: string, rel: string, content: string | null): void {
448 if (content === null) fs.rmSync(path.join(root, rel));
449 else write(root, { [rel]: content });
450}
451
452async function index(root: string): Promise<CodeGraph> {
453 const graph = await CodeGraph.init(root, { index: true });

Callers 1

Calls 2

writeFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected