import { promises as fs } from 'fs'; export async function fileExists(path: string): Promise { try { await fs.access(path); return true; } catch { return false; } }