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

Function cbm_app_local_dir

src/foundation/platform.c:381–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381const char *cbm_app_local_dir(void) {
382#ifdef _WIN32
383 static char buf[CBM_SZ_1K];
384 char tmp[CBM_SZ_256] = "";
385 cbm_safe_getenv("LOCALAPPDATA", tmp, sizeof(tmp), NULL);
386 if (tmp[0]) {
387 snprintf(buf, sizeof(buf), "%s", tmp);
388 cbm_normalize_path_sep(buf);
389 return buf;
390 }
391 const char *home = cbm_get_home_dir();
392 if (home) {
393 snprintf(buf, sizeof(buf), "%s/AppData/Local", home);
394 return buf;
395 }
396 return NULL;
397#else
398 return cbm_app_config_dir();
399#endif
400}
401
402/* ── Cache directory ────────────────────────── */
403

Callers 2

uninstall_editor_agentsFunction · 0.85

Calls 4

cbm_safe_getenvFunction · 0.85
cbm_normalize_path_sepFunction · 0.85
cbm_get_home_dirFunction · 0.85
cbm_app_config_dirFunction · 0.85

Tested by

no test coverage detected