MCPcopy Create free account
hub / github.com/cloudflare/agents / tryStat

Method tryStat

packages/shell/src/memory.ts:438–447  ·  view source on GitHub ↗
(
    getStat: () => Promise<FsStat>
  )

Source from the content-addressed store, hash-verified

436 // ── Private helpers ───────────────────────────────────────────────
437
438 private async tryStat(
439 getStat: () => Promise<FsStat>
440 ): Promise<StateStat | null> {
441 try {
442 return toStateStat(await getStat());
443 } catch (error) {
444 if (isEnoent(error)) return null;
445 throw error;
446 }
447 }
448
449 private async getFilePaths(pattern: string): Promise<string[]> {
450 const paths = await this.glob(pattern);

Callers 2

statMethod · 0.95
lstatMethod · 0.95

Calls 2

toStateStatFunction · 0.90
isEnoentFunction · 0.85

Tested by

no test coverage detected