MCPcopy Create free account
hub / github.com/T-Lab-CUHKSZ/claude-code / readTextSafe

Function readTextSafe

config-ui/server.ts:79–85  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

77}
78
79function readTextSafe(path: string): string {
80 try {
81 return readFileSync(path, 'utf-8')
82 } catch {
83 return ''
84 }
85}
86
87function writeTextSafe(path: string, content: string) {
88 const dir = dirname(path)

Callers 3

listMdFilesFunction · 0.85
parseFeatureFlagsFunction · 0.85
handleAPIFunction · 0.85

Calls 1

readFileSyncFunction · 0.90

Tested by

no test coverage detected