| 149 | } |
| 150 | |
| 151 | std::chrono::seconds ArchivalManager::ReadTimestamp(std::string const & filePath) |
| 152 | { |
| 153 | if (!Platform::IsFileExistsByFullPath(filePath)) |
| 154 | return std::chrono::seconds(0); |
| 155 | |
| 156 | try |
| 157 | { |
| 158 | FileReader reader(filePath); |
| 159 | ReaderSource<FileReader> src(reader); |
| 160 | uint64_t ts = 0; |
| 161 | ReadPrimitiveFromSource(src, ts); |
| 162 | return std::chrono::seconds(ts); |
| 163 | } |
| 164 | catch (std::exception const & e) |
| 165 | { |
| 166 | LOG(LWARNING, ("Error reading timestamp from file", e.what())); |
| 167 | } |
| 168 | return std::chrono::seconds(0); |
| 169 | } |
| 170 | |
| 171 | size_t ArchivalManager::GetMaxSavedFilesCount(std::string const & extension) const |
| 172 | { |
nothing calls this directly
no test coverage detected