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

Function jl_ensure_parent

src/cli/config_json_like.c:1501–1509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1499}
1500
1501static int jl_ensure_parent(const char *path) {
1502 char *parent = jl_parent_directory(path);
1503 if (!parent) {
1504 return -1;
1505 }
1506 int result = strcmp(parent, ".") == 0 || cbm_mkdir_p(parent, 0755) ? 0 : -1;
1507 free(parent);
1508 return result;
1509}
1510
1511static int jl_snapshot_matches_path(const char *path, const char *expected_content,
1512 size_t expected_length,

Callers 1

jl_write_atomicFunction · 0.85

Calls 2

jl_parent_directoryFunction · 0.85
cbm_mkdir_pFunction · 0.85

Tested by

no test coverage detected