MCPcopy Index your code
hub / github.com/anomalyco/opencode / exists

Function exists

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

Source from the content-addressed store, hash-verified

160 })
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)

Callers 1

index.tsFile · 0.70

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected