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

Function write_file_at

tests/test_incremental.c:56–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

test_incremental.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected