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

Function cif_component

src/discover/inventory_metadata.c:78–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78static bool cif_component(cif_context *c, const unsigned char *p, size_t n) {
79 if (!n || (n == 1 && p[0] == '.') || (n == 2 && p[0] == '.' && p[1] == '.')) {
80 return cif_fail(c, CBM_INVENTORY_INVALID);
81 }
82#ifdef _WIN32
83 if (!cif_poll(c)) {
84 return false;
85 }
86 if (cbm_path_windows_component(p, n) != CBM_PATH_SYNTAX_OK) {
87 return cif_fail(c, CBM_INVENTORY_UNSUPPORTED);
88 }
89 return cif_poll(c);
90#else
91 return true;
92#endif
93}
94
95static bool cif_file_path(cif_context *c, cbm_inventory_path_t path, size_t root_length) {
96 if (path.length > CIF_PATH_MAX) {

Callers 1

cif_file_pathFunction · 0.85

Calls 3

cif_failFunction · 0.85
cif_pollFunction · 0.85

Tested by

no test coverage detected