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

Method lstat

packages/shell/src/filesystem.ts:475–496  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

473 }
474
475 async lstat(path: string): Promise<FileStat | null> {
476 await this.ensureInit();
477 const normalized = normalizePath(path);
478 const T = this.tableName;
479 const rows = await this.sql.query<{
480 path: string;
481 name: string;
482 type: string;
483 mime_type: string;
484 size: number;
485 created_at: number;
486 modified_at: number;
487 target: string | null;
488 }>(
489 `SELECT path, name, type, mime_type, size, created_at, modified_at, target
490 FROM ${T} WHERE path = ?`,
491 normalized
492 );
493 const r = rows[0];
494 if (!r) return null;
495 return toFileInfo(r);
496 }
497
498 // ── Metadata ───────────────────────────────────────────────────
499

Callers 2

cpMethod · 0.95
mvMethod · 0.95

Calls 3

ensureInitMethod · 0.95
toFileInfoFunction · 0.85
normalizePathFunction · 0.70

Tested by

no test coverage detected