| 149 | } |
| 150 | |
| 151 | fs::path GetTempDirectoryPath() { |
| 152 | #ifndef WIN32 |
| 153 | return fs::temp_directory_path(); |
| 154 | #else |
| 155 | wchar_t dirPathWchars[MAX_PATH]; |
| 156 | GetTempPathW(MAX_PATH, dirPathWchars); |
| 157 | std::wstring dirPathWstring(dirPathWchars); |
| 158 | return fs::PathFromString( |
| 159 | std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>>().to_bytes( |
| 160 | dirPathWstring)); |
| 161 | #endif |
| 162 | } |
| 163 | |
| 164 | } // namespace fsbridge |