//#region ../@warlock.js/fs/src/exists.d.ts /** * Check whether a path exists, REGARDLESS of type — resolves `true` for both * files and directories, `false` only when nothing is there (ENOENT). * * Pick the right check for the job: * - `pathExistsAsync` — anything at this path (file OR directory). * - `fileExistsAsync` — exists AND is a regular file. * - `directoryExistsAsync` — exists AND is a directory. * * @example * if (await pathExistsAsync("/var/data")) { * // something is there — could be a file or a folder * } */ declare function pathExistsAsync(path: string): Promise; declare function pathExists(path: string): boolean; /** * Check whether a path exists AND is a regular file. Resolves `false` for a * directory — use `directoryExistsAsync` for folders, or `pathExistsAsync` * when the type does not matter. * * @example * if (await fileExistsAsync("/etc/config.json")) { * const raw = await readFile("/etc/config.json", "utf8"); * } */ declare function fileExistsAsync(path: string): Promise; declare function fileExists(path: string): boolean; /** * Check whether a path exists AND is a directory. Resolves `false` for a * regular file — use `fileExistsAsync` for files, or `pathExistsAsync` when * the type does not matter. * * @example * if (await directoryExistsAsync("/var/uploads")) { * const entries = await readdir("/var/uploads"); * } */ declare function directoryExistsAsync(path: string): Promise; declare function directoryExists(path: string): boolean; //#endregion export { directoryExists, directoryExistsAsync, fileExists, fileExistsAsync, pathExists, pathExistsAsync }; //# sourceMappingURL=exists.d.mts.map