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

Function write_file_at

tests/test_incremental.c:58–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

test_incremental.cFile · 0.85

Calls 1

fopenFunction · 0.85

Tested by

no test coverage detected