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

Function readTextIfExists

core/codex/native-integrations.js:45–48  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

43}
44
45function readTextIfExists(filePath) {
46 if (!fs.existsSync(filePath)) return '';
47 return fs.readFileSync(filePath, 'utf8');
48}
49
50function readJsonIfExists(filePath, options = {}) {
51 if (!fs.existsSync(filePath)) return null;

Callers 2

detectWindowsCodexSetupFunction · 0.85
checkCodexReadinessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected