MCPcopy Create free account
hub / github.com/EvoMap/evolver / readJsonFileResult

Function readJsonFileResult

src/proxy/clientSettings.js:110–119  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

108}
109
110function readJsonFileResult(file) {
111 try {
112 if (!file || !fs.existsSync(file)) {
113 return { exists: false, ok: true, value: null };
114 }
115 return { exists: true, ok: true, value: JSON.parse(fs.readFileSync(file, 'utf8')) };
116 } catch (err) {
117 return { exists: Boolean(file), ok: false, value: null, error: err };
118 }
119}
120
121function writePrivateJsonFile(file, data) {
122 fs.mkdirSync(path.dirname(file), { recursive: true });

Callers 2

readJsonFileFunction · 0.85
syncClaudeProxySettingsFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected