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

Function application_regular_db_exists

src/daemon/application.c:442–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442static bool application_regular_db_exists(const char *project) {
443 const char *cache = cbm_resolve_cache_dir();
444 if (!cache || !project || !project[0]) {
445 return false;
446 }
447 char path[APPLICATION_PATH_CAP];
448 int written = snprintf(path, sizeof(path), "%s/%s.db", cache, project);
449 if (written <= 0 || (size_t)written >= sizeof(path)) {
450 return false;
451 }
452 struct stat status;
453 return stat(path, &status) == 0 && S_ISREG(status.st_mode);
454}
455
456static bool application_canonical_directory_exists(const char *path) {
457 cbm_path_info_t info = {0};

Calls 2

cbm_resolve_cache_dirFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected