function pathExists
pathExists(path: string): Promise<boolean>

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

Examples

Example 1

import pathExists from './lib/utils/path-exists.ts';
console.assert(await pathExists('/tmp') === true);
console.assert(await pathExists('/tmp/nonexistent-qunitx-file') === false);

Parameters

path: string

Return Type

Promise<boolean>

Usage

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