MCPcopy Create free account
hub / github.com/MemNixFS/MemNixFS / normalize_path

Function normalize_path

src/mount/fuse_mount.cpp:36–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36std::string normalize_path(const char* path) {
37 if (!path || !*path) return "/";
38 std::string out(path);
39 std::replace(out.begin(), out.end(), '\\', '/');
40 while (out.size() > 1 && out.back() == '/') out.pop_back();
41 return out.empty() ? "/" : out;
42}
43
44NodePtr resolve_node(const char* path) {
45 auto* st = state();

Callers 1

resolve_nodeFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected