MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / openForScan

Function openForScan

source code/utils/readEditContext.ts:50–57  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

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