| 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")); |
nothing calls this directly
no test coverage detected