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

Function fromWorkspaceStat

packages/shell/src/workspace.ts:183–193  ·  view source on GitHub ↗
(stat: {
  type: string;
  size: number;
  updatedAt: number;
})

Source from the content-addressed store, hash-verified

181// ── Private helpers ───────────────────────────────────────────────────
182
183function fromWorkspaceStat(stat: {
184 type: string;
185 size: number;
186 updatedAt: number;
187}): FsStat {
188 return {
189 type: stat.type as FsStat["type"],
190 size: stat.size,
191 mtime: new Date(stat.updatedAt)
192 };
193}
194
195function normalizePath(path: string): string {
196 if (!path.startsWith("/")) path = "/" + path;

Callers 2

statMethod · 0.85
lstatMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected