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