13 #ifndef __STOUT_OS_WINDOWS_EXISTS_HPP__ 14 #define __STOUT_OS_WINDOWS_EXISTS_HPP__ 36 const DWORD attributes = ::GetFileAttributesW(
39 if (attributes == INVALID_FILE_ATTRIBUTES) {
40 const DWORD
error = ::GetLastError();
41 if (error == ERROR_FILE_NOT_FOUND || error == ERROR_PATH_NOT_FOUND) {
59 ::OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid),
62 return handle.get_handle() !=
nullptr;
68 #endif // __STOUT_OS_WINDOWS_EXISTS_HPP__
bool exists(const std::string &path)
Definition: exists.hpp:26
Definition: windows.hpp:72
Definition: posix_signalhandler.hpp:23
DWORD pid_t
Definition: windows.hpp:181
std::string error(const std::string &msg, uint32_t code)
std::wstring longpath(const std::string &path)
Definition: longpath.hpp:38