function pathExists
pathExists(path: string): Task<boolean, never>

Returns true if the given filesystem path is accessible, false otherwise.

await pathExists('/tmp'); // true
await pathExists('/tmp/nonexistent-qunitx-file'); // false — any access failure reads as absent

recover, not unwrapOr: this is one of the few places the catch-all is the point. "Can I reach it?" has no failure mode worth distinguishing — an ENOENT and an EACCES both mean the caller cannot use the path.

Parameters

path: string

Return Type

Task<boolean, never>

Usage

import { pathExists } from "lib/utils/path-exists.ts";