| 87 | MemmappedFileSystem::MemmappedFileSystem() {} |
| 88 | |
| 89 | Status MemmappedFileSystem::FileExists(const string& fname) { |
| 90 | if (!mapped_memory_) { |
| 91 | return errors::FailedPrecondition("MemmappedEnv is not initialized"); |
| 92 | } |
| 93 | const auto dir_element = directory_.find(fname); |
| 94 | if (dir_element != directory_.end()) { |
| 95 | return Status::OK(); |
| 96 | } |
| 97 | return errors::NotFound(fname, " not found"); |
| 98 | } |
| 99 | |
| 100 | Status MemmappedFileSystem::NewRandomAccessFile( |
| 101 | const string& filename, std::unique_ptr<RandomAccessFile>* result) { |