MCPcopy Create free account
hub / github.com/code-pushup/cli / directoryExists

Function directoryExists

packages/utils/src/lib/file-system.ts:25–32  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

23}
24
25export async function directoryExists(filePath: string): Promise<boolean> {
26 try {
27 const stats = await stat(filePath);
28 return stats.isDirectory();
29 } catch {
30 return false;
31 }
32}
33
34export async function ensureDirectoryExists(baseDir: string) {
35 try {

Callers 3

persistReportFunction · 0.90
binding.tsFile · 0.90
removeDirectoryIfExistsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected