function exists
exists(path: string | URL): Task<boolean, ExistsError>

Checks whether a path exists.

Examples

Example 1

if (await exists("./config.json").run()) {
  // file exists
}

Parameters

path: string | URL

Return Type

Task<boolean, ExistsError>

Usage

import { exists } from ".";