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

Function ValidateAbstractPathParts

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

Source from the content-addressed store, hash-verified

124}
125
126Status ValidateAbstractPathParts(const std::vector<std::string>& parts) {
127 for (const auto& part : parts) {
128 if (part.length() == 0) {
129 return Status::Invalid("Empty path component");
130 }
131 if (part.find_first_of(kSep) != std::string::npos) {
132 return Status::Invalid("Separator in component '", part, "'");
133 }
134 }
135 return Status::OK();
136}
137
138Status ValidateAbstractPath(std::string_view path) {
139 auto pos = path.find_first_of(kSep);

Callers 10

ValidateMethod · 0.85
TESTFunction · 0.85
OpenOutputStreamMethod · 0.85
OpenInputReaderMethod · 0.85
CreateDirMethod · 0.85
DeleteDirMethod · 0.85
DeleteDirContentsMethod · 0.85
DeleteFileMethod · 0.85
GetFileInfoMethod · 0.85
RunMethod · 0.85

Calls 3

InvalidFunction · 0.50
OKFunction · 0.50
lengthMethod · 0.45

Tested by 1

TESTFunction · 0.68