| 511 | } |
| 512 | |
| 513 | Status NewSequentialFile(const std::string& filename, |
| 514 | SequentialFile** result) override { |
| 515 | int fd = ::open(filename.c_str(), O_RDONLY | kOpenBaseFlags); |
| 516 | if (fd < 0) { |
| 517 | *result = nullptr; |
| 518 | return PosixError(filename, errno); |
| 519 | } |
| 520 | |
| 521 | *result = new PosixSequentialFile(filename, fd); |
| 522 | return Status::OK(); |
| 523 | } |
| 524 | |
| 525 | Status NewRandomAccessFile(const std::string& filename, |
| 526 | RandomAccessFile** result) override { |