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

Function EnsureTrailingSlash

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

Source from the content-addressed store, hash-verified

160}
161
162std::string EnsureTrailingSlash(std::string_view v) {
163 if (!v.empty() && !HasTrailingSlash(v)) {
164 // XXX How about "C:" on Windows? We probably don't want to turn it into "C:/"...
165 // Unless the local filesystem always uses absolute paths
166 return std::string(v) + kSep;
167 } else {
168 return std::string(v);
169 }
170}
171
172std::string EnsureLeadingSlash(std::string_view v) {
173 if (!HasLeadingSlash(v)) {

Callers 15

GetFileInfoMethod · 0.85
NormalizeBasePathMethod · 0.85
CreateEmptyDirMethod · 0.85
TESTFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
GetFileInfoMethod · 0.85
CreateDirMarkerMethod · 0.85

Calls 2

HasTrailingSlashFunction · 0.85
emptyMethod · 0.45

Tested by 3

TESTFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68