MCPcopy Create free account
hub / github.com/SethGammon/Citadel / writeFile

Function writeFile

scripts/codex-compat.js:46–53  ·  view source on GitHub ↗
(filePath, content)

Source from the content-addressed store, hash-verified

44function ensureDir(dir) {
45 if (!DRY_RUN && !fs.existsSync(dir)) {
46 fs.mkdirSync(dir, { recursive: true });
47 }
48}
49
50function writeFile(filePath, content) {
51 if (DRY_RUN) {
52 console.log(` [dry-run] Would write: ${filePath}`);
53 return;
54 }
55 ensureDir(path.dirname(filePath));
56 fs.writeFileSync(filePath, content, 'utf8');

Callers 8

generateConfigTomlFunction · 0.70
generatePluginMcpConfigFunction · 0.70
generatePluginManifestFunction · 0.70
generatePluginHooksFunction · 0.70
translateAgentsFunction · 0.70
syncProjectScriptsFunction · 0.70
generateOpenAIYamlFunction · 0.70
syncProjectGuidanceFunction · 0.70

Calls 1

ensureDirFunction · 0.70

Tested by

no test coverage detected