13 #ifndef __STOUT_OS_WINDOWS_MKDIR_HPP__ 14 #define __STOUT_OS_WINDOWS_MKDIR_HPP__ 34 const std::string& directory,
35 bool recursive =
true,
47 if (::CreateDirectoryW(longpath.data(),
nullptr) == 0) {
48 return WindowsError(
"Failed to create directory: " + directory);
60 foreach (
const std::string& token, tokens) {
74 #endif // __STOUT_OS_WINDOWS_MKDIR_HPP__
bool exists(const std::string &path)
Definition: exists.hpp:26
Definition: nothing.hpp:16
Definition: error.hpp:108
Definition: posix_signalhandler.hpp:23
std::string remove(const std::string &from, const std::string &substring, Mode mode=ANY)
Definition: strings.hpp:41
std::vector< std::string > tokenize(const std::string &s, const std::string &delims, const Option< size_t > &maxTokens=None())
Definition: strings.hpp:139
Try< Nothing > mkdir(const std::string &directory, bool recursive=true, bool sync=false)
Definition: mkdir.hpp:42
bool isError() const
Definition: try.hpp:78
std::wstring longpath(const std::string &path)
Definition: longpath.hpp:38
std::string stringify(int flags)
constexpr char PATH_SEPARATOR
Definition: constants.hpp:24