import { promises as fsp } from 'fs' // Check if a file exists export async function exists (path: string) { try { await fsp.access(path) return true } catch { return false } }