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

Function writeTextSafe

config-ui/server.ts:87–91  ·  view source on GitHub ↗
(path: string, content: string)

Source from the content-addressed store, hash-verified

85}
86
87function writeTextSafe(path: string, content: string) {
88 const dir = dirname(path)
89 if (!existsSync(dir)) mkdirSync(dir, { recursive: true })
90 writeFileSync(path, content)
91}
92
93function listMdFiles(dir: string): Array<{ name: string; path: string; content: string }> {
94 if (!existsSync(dir)) return []

Callers 2

writeFeatureFlagsFunction · 0.85
handleAPIFunction · 0.85

Calls 2

existsSyncFunction · 0.90
mkdirSyncFunction · 0.90

Tested by

no test coverage detected