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

Function cbm_app_local_dir

src/foundation/platform.c:553–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

551}
552
553const char *cbm_app_local_dir(void) {
554#ifdef _WIN32
555 static CBM_TLS char buf[CBM_SZ_1K];
556 char tmp[CBM_SZ_256] = "";
557 cbm_safe_getenv("LOCALAPPDATA", tmp, sizeof(tmp), NULL);
558 if (tmp[0]) {
559 snprintf(buf, sizeof(buf), "%s", tmp);
560 cbm_normalize_path_sep(buf);
561 return buf;
562 }
563 const char *home = cbm_get_home_dir();
564 if (home) {
565 snprintf(buf, sizeof(buf), "%s/AppData/Local", home);
566 return buf;
567 }
568 return NULL;
569#else
570 return cbm_app_config_dir();
571#endif
572}
573
574/* ── Cache directory ────────────────────────── */
575

Callers 1

th_secure_runtime_baseFunction · 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 1

th_secure_runtime_baseFunction · 0.68