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

Method CheckForDirectory

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

Source from the content-addressed store, hash-verified

191 }
192
193 Status CheckForDirectory(const std::string& path, const char* action) {
194 // Check existence of path, and that it's a directory
195 io::HdfsPathInfo info;
196 RETURN_NOT_OK(client_->GetPathInfo(path, &info));
197 if (info.kind != io::ObjectType::DIRECTORY) {
198 return Status::IOError("Cannot ", action, " directory '", path,
199 "': not a directory");
200 }
201 return Status::OK();
202 }
203
204 Status DeleteDir(const std::string& path) {
205 RETURN_NOT_OK(CheckForDirectory(path, "delete"));

Callers

nothing calls this directly

Calls 3

IOErrorFunction · 0.85
OKFunction · 0.50
GetPathInfoMethod · 0.45

Tested by

no test coverage detected