MCPcopy Create free account
hub / github.com/Noumena-Network/code / readTextIfExists

Function readTextIfExists

src/utils/citcWorkspaceSource.ts:103–109  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

101}
102
103async function readTextIfExists(path: string): Promise<string | null> {
104 try {
105 return await readFile(path, 'utf8')
106 } catch {
107 return null
108 }
109}
110
111async function findFirstExistingPath(
112 repoRoot: string,

Callers 3

findFirstExistingPathFunction · 0.85
findSaplingWorkspaceRootFunction · 0.85

Calls 1

readFileFunction · 0.85

Tested by

no test coverage detected