MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / safeReadFile

Function safeReadFile

cli/src/utils/theme-system.ts:185–191  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

183 raw.replace(/\/\*[\s\S]*?\*\//g, '').replace(/^\s*\/\/.*$/gm, '')
184
185const safeReadFile = (filePath: string): string | null => {
186 try {
187 return readFileSync(filePath, 'utf8')
188 } catch {
189 return null
190 }
191}
192
193const collectExistingPaths = (candidates: string[]): string[] => {
194 const seen = new Set<string>()

Callers 3

detectVSCodeThemeFunction · 0.85
detectJetBrainsThemeFunction · 0.85
detectZedThemeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected