| 143 | } |
| 144 | |
| 145 | int StorageFileManager::GetPreReadFile() { |
| 146 | auto it = file_list_.find(read_storage_->GetFileName()); |
| 147 | if (it == file_list_.end()) |
| 148 | return NO_FILES; |
| 149 | |
| 150 | if (it == file_list_.begin()) |
| 151 | return NO_FILES; |
| 152 | --it; |
| 153 | |
| 154 | return read_storage_->ReOpen(*it); |
| 155 | } |
| 156 | |
| 157 | int StorageFileManager::OpenNewWriteFile(const uint64_t &instanceid) { |
| 158 | return write_storage_->SetFileWritePos(GetNewFile(instanceid), 0); |
no test coverage detected