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

Function write_exact

tests/test_language.c:1365–1372  ·  view source on GitHub ↗

The file `name` with `content`, written byte for byte (no text-mode * conversion on any platform). */

Source from the content-addressed store, hash-verified

1363/* The file `name` with `content`, written byte for byte (no text-mode
1364 * conversion on any platform). */
1365static bool write_exact(const char *path, const char *content, size_t len) {
1366 FILE *f = fopen(path, "wb");
1367 if (!f) {
1368 return false;
1369 }
1370 bool ok = fwrite(content, 1, len, f) == len;
1371 return fclose(f) == 0 && ok;
1372}
1373
1374/* The classifier on the first probe_bytes(name) bytes of `content`, as the
1375 * pinned inventory calls it. */

Callers 1

test_language.cFile · 0.85

Calls 2

fopenFunction · 0.85
fwriteFunction · 0.85

Tested by

no test coverage detected