import { fromFileUrl } from "../path.ts";
type ExitsCallback = (exists: boolean) => void;
export function exists(path: string | URL, callback: ExitsCallback): void { path = path instanceof URL ? fromFileUrl(path) : path; Deno.lstat(path).then(() => callback(true), () => callback(false));}
export function existsSync(path: string | URL): boolean { path = path instanceof URL ? fromFileUrl(path) : path; try { Deno.lstatSync(path); return true; } catch (err) { if (err instanceof Deno.errors.NotFound) { return false; } throw err; }}