| 415 | } |
| 416 | |
| 417 | Result<std::shared_ptr<io::BufferReader>> OpenInputReader(const std::string& path) { |
| 418 | ARROW_RETURN_NOT_OK(internal::AssertNoTrailingSlash(path)); |
| 419 | auto parts = SplitAbstractPath(path); |
| 420 | RETURN_NOT_OK(ValidateAbstractPathParts(parts)); |
| 421 | |
| 422 | Entry* entry = FindEntry(parts); |
| 423 | if (entry == nullptr) { |
| 424 | return PathNotFound(path); |
| 425 | } |
| 426 | if (!entry->is_file()) { |
| 427 | return NotAFile(path); |
| 428 | } |
| 429 | return std::make_shared<MockFSInputStream>(entry->as_file()); |
| 430 | } |
| 431 | }; |
| 432 | |
| 433 | MockFileSystem::~MockFileSystem() = default; |
no test coverage detected