MCPcopy
hub / github.com/codeaashu/claude-code / checkPathExists

Function checkPathExists

src/utils/windowsPaths.ts:15–22  ·  view source on GitHub ↗

* Check if a file or directory exists on Windows using the dir command * @param path - The path to check * @returns true if the path exists, false otherwise

(path: string)

Source from the content-addressed store, hash-verified

13 * @returns true if the path exists, false otherwise
14 */
15function checkPathExists(path: string): boolean {
16 try {
17 execSync_DEPRECATED(`dir "${path}"`, { stdio: 'pipe' })
18 return true
19 } catch {
20 return false
21 }
22}
23
24/**
25 * Find an executable using where.exe on Windows

Callers 2

findExecutableFunction · 0.85
windowsPaths.tsFile · 0.85

Calls 1

execSync_DEPRECATEDFunction · 0.85

Tested by

no test coverage detected