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

Function readFileAsyncOrNull

src/utils/fileHistory.ts:1101–1107  ·  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

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

Callers 2

computeDiffStatsForFileFunction · 0.85

Calls 1

readFileFunction · 0.85

Tested by

no test coverage detected