(input: string | undefined)
| 361 | } |
| 362 | |
| 363 | function parseTs(input: string | undefined): number { |
| 364 | if (!input) return 0; |
| 365 | const n = Date.parse(input); |
| 366 | return Number.isFinite(n) ? n : 0; |
| 367 | } |
| 368 | |
| 369 | async function pathExists(p: string): Promise<boolean> { |
| 370 | try { await stat(p); return true; } catch { return false; } |