| 209 | } |
| 210 | |
| 211 | Status Abort() override { |
| 212 | if (!closed_) { |
| 213 | // MockFSOutputStream is mainly used for debugging and testing, so |
| 214 | // mark an aborted file's contents explicitly. |
| 215 | std::stringstream ss; |
| 216 | ss << "MockFSOutputStream aborted after " << file_->size() << " bytes written"; |
| 217 | file_->data = Buffer::FromString(ss.str()); |
| 218 | closed_ = true; |
| 219 | } |
| 220 | return Status::OK(); |
| 221 | } |
| 222 | |
| 223 | bool closed() const override { return closed_; } |
| 224 |
nothing calls this directly
no test coverage detected