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

Function jl_write_atomic

src/cli/config_json_like.c:1780–1791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1778}
1779
1780static int jl_write_atomic(const char *requested_path, const char *content, size_t length,
1781 const char *expected_content, size_t expected_length,
1782 const jl_file_snapshot_t *expected_snapshot) {
1783 cbm_config_edit_target_t target;
1784 if (cbm_config_edit_target_open(requested_path, &target) < 0) {
1785 return -1;
1786 }
1787 int result = jl_write_atomic_at(&target, content, length, expected_content, expected_length,
1788 expected_snapshot);
1789 cbm_config_edit_target_close(&target);
1790 return result;
1791}
1792
1793static int jl_decode_utf8(const unsigned char *text, size_t remaining, uint32_t *codepoint,
1794 size_t *byte_count) {

Callers 1

jl_write_documentFunction · 0.85

Calls 3

jl_write_atomic_atFunction · 0.85

Tested by

no test coverage detected