MCPcopy
hub / github.com/rpamis/comet / fileExists

Function fileExists

src/utils/file-system.ts:58–65  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

56 * Check if a file or directory exists.
57 */
58export async function fileExists(filePath: string): Promise<boolean> {
59 try {
60 await fs.access(filePath);
61 return true;
62 } catch {
63 return false;
64 }
65}
66
67/**
68 * Read and parse a JSON file.

Callers 15

checkWorkingDirsFunction · 0.50
checkSkillCompletenessFunction · 0.50
checkScriptsPresentFunction · 0.50
checkCometYamlValidityFunction · 0.50
checkCodegraphFunction · 0.50
countTasksFunction · 0.50
readCometStateFunction · 0.50
getActiveChangesFunction · 0.50
hasLocalCometSkillsFunction · 0.50
detectCometPackageScopeFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected