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

Function jl_write_document

src/cli/config_json_like.c:1970–1979  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1968}
1969
1970static int jl_write_document(const char *path, const char *content, size_t length,
1971 const char *expected_content, size_t expected_length,
1972 const jl_file_snapshot_t *expected_snapshot) {
1973 size_t root = 0;
1974 if (jl_validate_document(content, length, &root) != 0) {
1975 return -1;
1976 }
1977 return jl_write_atomic(path, content, length, expected_content, expected_length,
1978 expected_snapshot);
1979}
1980
1981#ifdef CBM_JSON_LIKE_ENABLE_TEST_API
1982void 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