| 629 | const std::string& GetContent(const std::string& f) { return files_[f]; } |
| 630 | |
| 631 | const Status WriteToNewFile(const std::string& file_name, |
| 632 | const std::string& content) { |
| 633 | std::unique_ptr<WritableFile> r; |
| 634 | auto s = NewWritableFile(file_name, &r, EnvOptions()); |
| 635 | if (!s.ok()) { |
| 636 | return s; |
| 637 | } |
| 638 | r->Append(content); |
| 639 | r->Flush(); |
| 640 | r->Close(); |
| 641 | assert(files_[file_name] == content); |
| 642 | return Status::OK(); |
| 643 | } |
| 644 | |
| 645 | // The following text is boilerplate that forwards all methods to target() |
| 646 | Status NewSequentialFile(const std::string& f, |
no test coverage detected