MCPcopy Index your code
hub / github.com/codeaashu/claude-code / openForScan

Function openForScan

src/utils/readEditContext.ts:48–55  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

46 * Opens `path` for reading. Returns null on ENOENT. Caller owns close().
47 */
48export async function openForScan(path: string): Promise<FileHandle | null> {
49 try {
50 return await open(path, 'r')
51 } catch (e) {
52 if (isENOENT(e)) return null
53 throw e
54 }
55}
56
57/**
58 * Handle-accepting core of readEditContext. Caller owns open/close.

Callers 3

loadRejectionDiffFunction · 0.85
loadDiffDataFunction · 0.85
readEditContextFunction · 0.85

Calls 2

openFunction · 0.85
isENOENTFunction · 0.85

Tested by

no test coverage detected