| 296 | } |
| 297 | |
| 298 | inline std::filesystem::file_time_type ZipFile::Item::getFileTime() const |
| 299 | { |
| 300 | std::tm tm {}; |
| 301 | tm.tm_year = (int) (date >> 9); |
| 302 | tm.tm_mon = (int) (((date >> 5) & 15u) - 1u); |
| 303 | tm.tm_mday = date & 31u; |
| 304 | tm.tm_hour = (int) (time >> 11); |
| 305 | tm.tm_min = (time >> 5) & 63u; |
| 306 | tm.tm_sec = (int) ((time & 31u) * 2u); |
| 307 | tm.tm_isdst = 0; |
| 308 | |
| 309 | auto systemTime = std::chrono::system_clock::from_time_t (std::mktime (&tm)); |
| 310 | return std::filesystem::file_time_type (systemTime.time_since_epoch()); |
| 311 | } |
| 312 | |
| 313 | inline ZipFile::Item::Item (ZipFile& f, const char* entryData, uint32_t filenameLength) |
| 314 | : owner (std::addressof (f)) |
nothing calls this directly
no outgoing calls
no test coverage detected