| 559 | } |
| 560 | |
| 561 | Result<FileInfo> MockFileSystem::GetFileInfo(const std::string& path) { |
| 562 | RETURN_NOT_OK(ValidatePath(path)); |
| 563 | auto parts = SplitAbstractPath(path); |
| 564 | RETURN_NOT_OK(ValidateAbstractPathParts(parts)); |
| 565 | |
| 566 | auto guard = impl_->lock_guard(); |
| 567 | |
| 568 | FileInfo info; |
| 569 | Entry* entry = impl_->FindEntry(parts); |
| 570 | if (entry == nullptr) { |
| 571 | info.set_type(FileType::NotFound); |
| 572 | } else { |
| 573 | info = entry->GetInfo(); |
| 574 | } |
| 575 | info.set_path(path); |
| 576 | return info; |
| 577 | } |
| 578 | |
| 579 | Result<FileInfoVector> MockFileSystem::GetFileInfo(const FileSelector& selector) { |
| 580 | RETURN_NOT_OK(ValidatePath(selector.base_dir)); |
nothing calls this directly
no test coverage detected