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

Function pf_directory_only

tests/test_pipeline_frozen.c:118–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116 return ok;
117}
118static bool pf_directory_only(const char *directory, const char *allowed) {
119 cbm_dir_t *dir = cbm_opendir(directory);
120 if (!dir)
121 return false;
122 bool ok = true;
123 cbm_dirent_t *entry;
124 while ((entry = cbm_readdir(dir)) != NULL) {
125 if (pf_text(entry->name, ".") || pf_text(entry->name, ".."))
126 continue;
127 if (!allowed || !pf_text(entry->name, allowed))
128 ok = false;
129 }
130 cbm_closedir(dir);
131 return ok;
132}
133static bool pf_env_start(pf_fixture_t *f) {
134 static const char *const names[] = {"CBM_WORKERS", "CBM_INDEX_SINGLE_THREAD",
135 "CBM_DISABLE_LSP_CROSS", "CBM_MEM_SPILL"};

Callers 13

pf_feature_controlFunction · 0.85
pf_hook_failureFunction · 0.85
pf_sidecar_refusalFunction · 0.85
pf_path_refusalFunction · 0.85
pf_cancel_failureFunction · 0.85
pf_rename_failureFunction · 0.85
pf_busy_retryFunction · 0.85
pf_resource_limitFunction · 0.85
pf_wide_oid_controlFunction · 0.85
pf_diag_runFunction · 0.85

Calls 4

cbm_opendirFunction · 0.85
cbm_readdirFunction · 0.85
pf_textFunction · 0.85
cbm_closedirFunction · 0.85

Tested by

no test coverage detected