MCPcopy
hub / github.com/claude-code-best/claude-code / readFileAsyncOrNull

Function readFileAsyncOrNull

src/utils/fileHistory.ts:1103–1109  ·  view source on GitHub ↗

Async read that swallows all errors and returns null (best-effort).

(path: string)

Source from the content-addressed store, hash-verified

1101
1102/** Async read that swallows all errors and returns null (best-effort). */
1103async function readFileAsyncOrNull(path: string): Promise<string | null> {
1104 try {
1105 return await readFile(path, 'utf-8')
1106 } catch {
1107 return null
1108 }
1109}
1110
1111const ENABLE_DUMP_STATE = false
1112function maybeDumpStateForDebug(state: FileHistoryState): void {

Callers 2

computeDiffStatsForFileFunction · 0.85

Calls 1

readFileFunction · 0.85

Tested by

no test coverage detected