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

Function source_write

tests/test_userconfig.c:237–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237static int source_write(const char *path, const char *bytes) {
238 FILE *file = cbm_fopen(path, "wb");
239 if (!file) return -1;
240 size_t len = strlen(bytes);
241 bool ok = fwrite(bytes, 1, len, file) == len;
242 if (fclose(file) != 0) ok = false;
243 return ok ? 0 : -1;
244}
245
246static void source_fixture_close(source_fixture_t *f) {
247 (void)remove(f->path);

Callers 1

test_userconfig.cFile · 0.85

Calls 2

cbm_fopenFunction · 0.85
fwriteFunction · 0.85

Tested by

no test coverage detected