MCPcopy
hub / github.com/qawolf/cli / pathExists

Function pathExists

src/shell/fs.ts:6–14  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

4import { isNoEntError } from "~/core/errors.js";
5
6export async function pathExists(p: string): Promise<boolean> {
7 try {
8 await fs.promises.stat(p);
9 return true;
10 } catch (err) {
11 if (isNoEntError(err)) return false;
12 throw err;
13 }
14}
15
16type FsStat = Pick<
17 fs.Stats,

Callers 3

extract.test.tsFile · 0.50
envVars.test.tsFile · 0.50

Calls 1

isNoEntErrorFunction · 0.85

Tested by

no test coverage detected