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

Function write_file_at

tests/test_incremental.c:57–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57static void write_file_at(const char *rel_path, const char *content) {
58 char path[512];
59 snprintf(path, sizeof(path), "%s/%s", g_repodir, rel_path);
60 char dir[512];
61 snprintf(dir, sizeof(dir), "%s", path);
62 char *slash = strrchr(dir, '/');
63 if (slash) {
64 *slash = '\0';
65 cbm_mkdir(dir);
66 }
67 FILE *f = fopen(path, "w");
68 if (f) {
69 fputs(content, f);
70 fclose(f);
71 }
72}
73
74static void delete_file_at(const char *rel_path) {
75 char path[512];

Callers 1

test_incremental.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected