MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / dir_exists

Function dir_exists

src/cli/cli.c:2207–2214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2205/* ── Agent detection ──────────────────────────────────────────── */
2206
2207static bool dir_exists(const char *path) {
2208 struct stat st;
2209#ifndef _WIN32
2210 return lstat(path, &st) == 0 && S_ISDIR(st.st_mode);
2211#else
2212 return stat(path, &st) == 0 && S_ISDIR(st.st_mode);
2213#endif
2214}
2215
2216/* Resolve the Claude Code config dir.
2217 * Honors $CLAUDE_CONFIG_DIR; falls back to "$home_dir/.claude". */

Callers 2

cbm_detect_agentsFunction · 0.85

Calls 1

statClass · 0.70

Tested by

no test coverage detected