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

Function path_basename

src/pipeline/pass_pkgmap.c:135–138  ·  view source on GitHub ↗

Get the basename from a relative path. Returns pointer into rel_path. */

Source from the content-addressed store, hash-verified

133
134/* Get the basename from a relative path. Returns pointer into rel_path. */
135static const char *path_basename(const char *rel_path) {
136 const char *last = strrchr(rel_path, '/');
137 return last ? last + SKIP_ONE : rel_path;
138}
139
140/* Get the directory part of a relative path (without trailing slash).
141 * Returns heap-allocated string. For "foo.json" returns "". */

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected