| 556 | } |
| 557 | |
| 558 | Status NewWritableFile(const std::string& filename, |
| 559 | WritableFile** result) override { |
| 560 | int fd = ::open(filename.c_str(), |
| 561 | O_TRUNC | O_WRONLY | O_CREAT | kOpenBaseFlags, 0644); |
| 562 | if (fd < 0) { |
| 563 | *result = nullptr; |
| 564 | return PosixError(filename, errno); |
| 565 | } |
| 566 | |
| 567 | *result = new PosixWritableFile(filename, fd); |
| 568 | return Status::OK(); |
| 569 | } |
| 570 | |
| 571 | Status NewAppendableFile(const std::string& filename, |
| 572 | WritableFile** result) override { |
nothing calls this directly
no test coverage detected