| 39 | } |
| 40 | |
| 41 | static bool HasEnoughSpace(std::wstring_view drive, size_t bytes) |
| 42 | { |
| 43 | ULARGE_INTEGER availableBytes{}; |
| 44 | return GetDiskFreeSpaceExW( |
| 45 | drive.data(), |
| 46 | &availableBytes, |
| 47 | nullptr, |
| 48 | nullptr |
| 49 | ) && bytes <= availableBytes.QuadPart; |
| 50 | } |
| 51 | |
| 52 | static std::wstring const& GetAvailableDrive(size_t bytes) |
| 53 | { |