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

Function jl_write_document

src/cli/config_json_like.c:2037–2046  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2035}
2036
2037static int jl_write_document(const char *path, const char *content, size_t length,
2038 const char *expected_content, size_t expected_length,
2039 const jl_file_snapshot_t *expected_snapshot) {
2040 size_t root = 0;
2041 if (jl_validate_document(content, length, &root) != 0) {
2042 return -1;
2043 }
2044 return jl_write_atomic(path, content, length, expected_content, expected_length,
2045 expected_snapshot);
2046}
2047
2048#ifdef CBM_JSON_LIKE_ENABLE_TEST_API
2049void cbm_json_like_set_precommit_hook_for_testing(cbm_json_like_precommit_test_hook_t hook,

Calls 2

jl_validate_documentFunction · 0.85
jl_write_atomicFunction · 0.85

Tested by

no test coverage detected