13 #ifndef __STOUT_OS_WINDOWS_TEMP_HPP__ 14 #define __STOUT_OS_WINDOWS_TEMP_HPP__ 30 inline std::string
temp()
32 const size_t size =
static_cast<size_t>(MAX_PATH) + 2;
33 std::vector<wchar_t> buffer;
35 if (::GetTempPathW(static_cast<DWORD>(size), buffer.data()) == 0) {
37 if (::GetCurrentDirectoryW(static_cast<DWORD>(size), buffer.data()) == 0) {
43 return stringify(std::wstring(buffer.data()));
48 #endif // __STOUT_OS_WINDOWS_TEMP_HPP__ Try< Bytes > size(const std::string &path, const FollowSymlink follow=FollowSymlink::FOLLOW_SYMLINK)
Definition: stat.hpp:130
Definition: posix_signalhandler.hpp:23
std::string temp()
Definition: temp.hpp:27
std::string stringify(int flags)