Function
fromWorkspaceStat
(stat: {
type: string;
size: number;
updatedAt: number;
})
Source from the content-addressed store, hash-verified
| 181 | // ── Private helpers ─────────────────────────────────────────────────── |
| 182 | |
| 183 | function 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 | |
| 195 | function normalizePath(path: string): string { |
| 196 | if (!path.startsWith("/")) path = "/" + path; |
Tested by
no test coverage detected