| 67 | HdfsOptions options() const { return options_; } |
| 68 | |
| 69 | Result<FileInfo> GetFileInfo(const std::string& path) { |
| 70 | // It has unfortunately been a frequent logic error to pass URIs down |
| 71 | // to GetFileInfo (e.g. ARROW-10264). Unlike other filesystems, HDFS |
| 72 | // silently accepts URIs but returns different results than if given the |
| 73 | // equivalent in-filesystem paths. Instead of raising cryptic errors |
| 74 | // later, notify the underlying problem immediately. |
| 75 | if (path.substr(0, 5) == "hdfs:") { |
| 76 | return Status::Invalid("GetFileInfo must not be passed a URI, got: ", path); |
| 77 | } |
| 78 | FileInfo info; |
| 79 | io::HdfsPathInfo path_info; |
| 80 | auto status = client_->GetPathInfo(path, &path_info); |
| 81 | info.set_path(path); |
| 82 | if (status.IsIOError()) { |
| 83 | info.set_type(FileType::NotFound); |
| 84 | return info; |
| 85 | } |
| 86 | |
| 87 | PathInfoToFileInfo(path_info, &info); |
| 88 | return info; |
| 89 | } |
| 90 | |
| 91 | Status StatSelector(const std::string& wd, const std::string& path, |
| 92 | const FileSelector& select, int nesting_depth, |
nothing calls this directly
no test coverage detected