| 49 | #ifdef _WIN32 |
| 50 | |
| 51 | static std::time_t ConvertFileTimeToUnixTime(const FILETIME& ft) |
| 52 | { |
| 53 | // based off https://stackoverflow.com/a/6161842 |
| 54 | static constexpr s64 WINDOWS_TICK = 10000000; |
| 55 | static constexpr s64 SEC_TO_UNIX_EPOCH = 11644473600LL; |
| 56 | |
| 57 | const s64 full = static_cast<s64>((static_cast<u64>(ft.dwHighDateTime) << 32) | static_cast<u64>(ft.dwLowDateTime)); |
| 58 | return static_cast<std::time_t>(full / WINDOWS_TICK - SEC_TO_UNIX_EPOCH); |
| 59 | } |
| 60 | |
| 61 | template <class T> |
| 62 | static bool IsUNCPath(const T& path) |
no outgoing calls
no test coverage detected