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

Function GetAbstractPathParent

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

Source from the content-addressed store, hash-verified

99}
100
101std::pair<std::string, std::string> GetAbstractPathParent(const std::string& s) {
102 // XXX should strip trailing slash?
103
104 auto pos = s.find_last_of(kSep);
105 if (pos == std::string::npos) {
106 // Empty parent
107 return {{}, s};
108 }
109 return {s.substr(0, pos), s.substr(pos + 1)};
110}
111
112std::string GetAbstractPathExtension(const std::string& s) {
113 std::string_view basename(s);

Callers 13

ParseKeysMethod · 0.85
StripPrefixAndFilenameFunction · 0.85
MakeMethod · 0.85
base_nameMethod · 0.85
dir_nameMethod · 0.85
GetNewDirectoriesMethod · 0.85
CreateDirMethod · 0.85
TESTFunction · 0.85
TEST_FFunction · 0.85
CreateFileMethod · 0.85
parentMethod · 0.85

Calls 1

substrMethod · 0.80

Tested by 2

TESTFunction · 0.68
TEST_FFunction · 0.68