MCPcopy Index your code
hub / github.com/PatrickSys/codebase-context / fileExists

Function fileExists

src/index.ts:847–854  ·  view source on GitHub ↗

* Check if file/directory exists

(filePath: string)

Source from the content-addressed store, hash-verified

845 * Check if file/directory exists
846 */
847async function fileExists(filePath: string): Promise<boolean> {
848 try {
849 await fs.access(filePath);
850 return true;
851 } catch {
852 return false;
853 }
854}
855
856/**
857 * Migrate legacy file structure to .codebase-context/ folder.

Callers 3

requireValidIndexFunction · 0.70
migrateToNewStructureFunction · 0.70
extractGitMemoriesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected