MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / readOptionalFile

Function readOptionalFile

scripts/smoke-claw-code-desktop.mjs:102–108  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

100}
101
102async function readOptionalFile(filePath) {
103 try {
104 return await readFile(filePath, 'utf8')
105 } catch {
106 return null
107 }
108}
109
110async function restoreOptionalFile(filePath, snapshot) {
111 if (snapshot === null) {

Callers 1

mainFunction · 0.85

Calls 1

readFileFunction · 0.85

Tested by

no test coverage detected