MCPcopy Create free account
hub / github.com/anomalyco/opencode / exists

Function exists

packages/core/test/util/effect-flock.test.ts:22–27  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

20}
21
22async function exists(file: string) {
23 return fs
24 .stat(file)
25 .then(() => true)
26 .catch(() => false)
27}
28
29async function readJson<T>(p: string): Promise<T> {
30 return JSON.parse(await fs.readFile(p, "utf8"))

Callers 2

waitForFileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected