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

Function statAsync

packages/opencode/src/util/filesystem.ts:28–33  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

26}
27
28export async function statAsync(p: string): Promise<ReturnType<typeof statSync> | undefined> {
29 return statFile(p).catch((e) => {
30 if (isEnoent(e)) return undefined
31 throw e
32 })
33}
34
35export async function size(p: string): Promise<number> {
36 const s = stat(p)?.size ?? 0

Callers

nothing calls this directly

Calls 1

isEnoentFunction · 0.85

Tested by

no test coverage detected