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

Function jl_write

tests/test_config_json_like.c:77–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77static int jl_write(const char *path, const char *content) {
78 FILE *file = cbm_fopen(path, "wb");
79 if (!file) {
80 return -1;
81 }
82 size_t length = strlen(content);
83 size_t written = fwrite(content, 1U, length, file);
84 int close_result = fclose(file);
85 return written == length && close_result == 0 ? 0 : -1;
86}
87
88static char *jl_read(const char *path) {
89 FILE *file = cbm_fopen(path, "rb");

Callers 3

jl_failed_unchangedFunction · 0.85
jl_change_before_commitFunction · 0.85

Calls 1

cbm_fopenFunction · 0.85

Tested by

no test coverage detected