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

Function activation_test_write

tests/test_activation_transaction.c:59–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59static bool activation_test_write(const char *path, const char *contents) {
60 FILE *file = cbm_fopen(path, "wb");
61 if (!file) {
62 return false;
63 }
64 size_t length = strlen(contents);
65 bool ok = fwrite(contents, 1, length, file) == length;
66 ok = fclose(file) == 0 && ok;
67#ifndef _WIN32
68 ok = chmod(path, 0700) == 0 && ok;
69#endif
70 return ok;
71}
72
73static bool activation_test_exists(const char *path) {
74 struct stat status;

Calls 1

cbm_fopenFunction · 0.85

Tested by

no test coverage detected