| 569 | } |
| 570 | |
| 571 | Status NewAppendableFile(const std::string& filename, |
| 572 | WritableFile** result) override { |
| 573 | int fd = ::open(filename.c_str(), |
| 574 | O_APPEND | O_WRONLY | O_CREAT | kOpenBaseFlags, 0644); |
| 575 | if (fd < 0) { |
| 576 | *result = nullptr; |
| 577 | return PosixError(filename, errno); |
| 578 | } |
| 579 | |
| 580 | *result = new PosixWritableFile(filename, fd); |
| 581 | return Status::OK(); |
| 582 | } |
| 583 | |
| 584 | bool FileExists(const std::string& filename) override { |
| 585 | return ::access(filename.c_str(), F_OK) == 0; |
nothing calls this directly
no test coverage detected