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

Function sharedFile

__tests__/installer-targets.test.ts:2613–2618  ·  view source on GitHub ↗

A file in the shared folder the links point into, written with `content` when given.

(name: string, content?: string)

Source from the content-addressed store, hash-verified

2611 }
2612 /** A file in the shared folder the links point into, written with `content` when given. */
2613 function sharedFile(name: string, content?: string): string {
2614 const file = path.join(tmpHome, 'dotfiles', name);
2615 fs.mkdirSync(path.dirname(file), { recursive: true });
2616 if (content !== undefined) fs.writeFileSync(file, content);
2617 return file;
2618 }
2619
2620 // Every file each agent's install writes, at both locations: whatever the
2621 // installer does, it never replaces or removes a link.

Callers 1

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected