MCPcopy Create free account
hub / github.com/cloudflare/computer / mapStat

Function mapStat

packages/computer/src/backends/worker-shell/adapter.ts:273–282  ·  view source on GitHub ↗
(s: WorkspaceStatResult)

Source from the content-addressed store, hash-verified

271}
272
273function mapStat(s: WorkspaceStatResult): FsStat {
274 return {
275 isFile: s.isFile,
276 isDirectory: s.isDirectory,
277 isSymbolicLink: s.isSymbolicLink,
278 mode: s.mode,
279 size: s.size,
280 mtime: new Date(s.mtime),
281 };
282}
283
284function isDevDir(path: string): boolean {
285 return normalizePath(path) === "/dev";

Callers 2

statMethod · 0.85
lstatMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected