MCPcopy Create free account
hub / github.com/apache/arrow / RemoveAncestor

Function RemoveAncestor

cpp/src/arrow/filesystem/path_util.cc:253–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253std::optional<std::string_view> RemoveAncestor(std::string_view ancestor,
254 std::string_view descendant) {
255 if (!IsAncestorOf(ancestor, descendant)) {
256 return std::nullopt;
257 }
258
259 auto relative_to_ancestor = descendant.substr(ancestor.size());
260 return RemoveLeadingSlash(relative_to_ancestor);
261}
262
263std::vector<std::string> AncestorsFromBasePath(std::string_view base_path,
264 std::string_view descendant) {

Callers 4

StripPrefixFunction · 0.85
MakeMethod · 0.85
CopyFilesFunction · 0.85
AncestorsFromBasePathFunction · 0.85

Calls 4

RemoveLeadingSlashFunction · 0.85
substrMethod · 0.80
IsAncestorOfFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected