import { promisify } from "node:util"; import { execFile as execFileCallback, spawn as spawnCallback, } from "node:child_process"; import { access, stat } from "node:fs/promises"; export const execFile = promisify(execFileCallback); export const spawn = promisify(spawnCallback); export async function canAccess(path: string): Promise { try { await access(path); return true; } catch { return false; } } export async function exists(path: string): Promise { try { await stat(path); return true; } catch { return false; } }