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

Method CreateDir

cpp/src/arrow/filesystem/hdfs.cc:178–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176 }
177
178 Status CreateDir(const std::string& path, bool recursive) {
179 if (IsDirectory(path)) {
180 return Status::OK();
181 }
182 if (!recursive) {
183 const auto parent = GetAbstractPathParent(path).first;
184 if (!parent.empty() && !IsDirectory(parent)) {
185 return Status::IOError("Cannot create directory '", path,
186 "': parent is not a directory");
187 }
188 }
189 RETURN_NOT_OK(client_->MakeDirectory(path));
190 return Status::OK();
191 }
192
193 Status CheckForDirectory(const std::string& path, const char* action) {
194 // Check existence of path, and that it's a directory

Callers

nothing calls this directly

Calls 6

GetAbstractPathParentFunction · 0.85
IOErrorFunction · 0.85
IsDirectoryFunction · 0.70
OKFunction · 0.50
emptyMethod · 0.45
MakeDirectoryMethod · 0.45

Tested by

no test coverage detected