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

Function application_regular_db_exists

src/daemon/application.c:362–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362static bool application_regular_db_exists(const char *project) {
363 const char *cache = cbm_resolve_cache_dir();
364 if (!cache || !project || !project[0]) {
365 return false;
366 }
367 char path[APPLICATION_PATH_CAP];
368 int written = snprintf(path, sizeof(path), "%s/%s.db", cache, project);
369 if (written <= 0 || (size_t)written >= sizeof(path)) {
370 return false;
371 }
372 struct stat status;
373 return stat(path, &status) == 0 && S_ISREG(status.st_mode);
374}
375
376static cbm_daemon_application_watch_t *application_find_watch_locked(
377 cbm_daemon_application_t *application, const char *project) {

Calls 2

cbm_resolve_cache_dirFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected