| 59 | SequentialReadFileSystemAdaptor() {} |
| 60 | |
| 61 | virtual braft::FileAdaptor* open(const std::string& path, int oflag, |
| 62 | const ::google::protobuf::Message* file_meta, |
| 63 | butil::File::Error* e) { |
| 64 | braft::FileAdaptor* file = |
| 65 | braft::PosixFileSystemAdaptor::open(path, oflag, file_meta, e); |
| 66 | if (file && (oflag & O_RDONLY)) { |
| 67 | return new ReadFileAdaptor(file); |
| 68 | } else { |
| 69 | return file; |
| 70 | } |
| 71 | } |
| 72 | }; |
| 73 | |
| 74 | #define FOR_EACH_FILE_SYSTEM_ADAPTOR_BEGIN(fs) \ |
no outgoing calls
no test coverage detected