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

Function file_has_content

tests/test_pipeline.c:5858–5867  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5856}
5857
5858static bool file_has_content(const char *path, const char *expected) {
5859 FILE *f = cbm_fopen(path, "rb");
5860 if (!f) {
5861 return false;
5862 }
5863 char buf[256] = {0};
5864 size_t n = fread(buf, 1, sizeof(buf) - 1, f);
5865 (void)fclose(f);
5866 return n == strlen(expected) && memcmp(buf, expected, n) == 0;
5867}
5868
5869/* #1839 / #1864: a stage a dead writer left beside a VALID database is swept
5870 * by the next run and never influences its route. The 0-byte shape is what a

Callers 1

test_pipeline.cFile · 0.85

Calls 2

cbm_fopenFunction · 0.85
freadFunction · 0.85

Tested by

no test coverage detected