MCPcopy
hub / github.com/anomalyco/opencode / read

Function read

packages/opencode/src/snapshot/index.ts:163–163  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

161
162 const exists = (file: string) => fs.exists(file).pipe(Effect.orDie)
163 const read = (file: string) => fs.readFileString(file).pipe(Effect.catch(() => Effect.succeed("")))
164 const remove = (file: string) => fs.remove(file).pipe(Effect.catch(() => Effect.void))
165 const locked = <A, E, R>(fx: Effect.Effect<A, E, R>) => lock(state.gitdir).withPermits(1)(fx)
166

Callers 2

index.tsFile · 0.70
instruction.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected