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

Function ConcatAbstractPath

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

Source from the content-addressed store, hash-verified

148}
149
150std::string ConcatAbstractPath(std::string_view base, std::string_view stem) {
151 DCHECK(!stem.empty());
152 if (base.empty()) {
153 return std::string{stem};
154 }
155 std::string result;
156 result.reserve(base.length() + stem.length() + 1); // extra 1 is for potential kSep
157 result += EnsureTrailingSlash(base);
158 result += RemoveLeadingSlash(stem);
159 return result;
160}
161
162std::string EnsureTrailingSlash(std::string_view v) {
163 if (!v.empty() && !HasTrailingSlash(v)) {

Callers 15

GetNextFilenameMethod · 0.85
joinMethod · 0.85
FileInfoFromPathFunction · 0.85
FileInfoFromBlobFunction · 0.85
PrependBaseMethod · 0.85
PrependBaseNonEmptyMethod · 0.85
CopyFilesFunction · 0.85
TESTFunction · 0.85
CreateMethod · 0.85

Calls 5

EnsureTrailingSlashFunction · 0.85
RemoveLeadingSlashFunction · 0.85
emptyMethod · 0.45
reserveMethod · 0.45
lengthMethod · 0.45

Tested by 8

TESTFunction · 0.68
CreateMethod · 0.68
CreateHierarchyMethod · 0.68
TEST_FFunction · 0.68
PathMethod · 0.68
TestFromUriAbfsMethod · 0.68
TestMovePathFunction · 0.68
TEST_FFunction · 0.68