25const std::string
separator() {
return "\\"; }
29 std::string ret = path;
31 std::string candidate =
"/";
33 while ((start_pos = ret.find(candidate, start_pos)) != std::string::npos)
35 ret.replace(start_pos, candidate.length(),
separator());
41bool is_dir(
const std::string &path)
43 DWORD ftyp = GetFileAttributesA(path.c_str());
44 if (ftyp == INVALID_FILE_ATTRIBUTES)
47 if (ftyp & FILE_ATTRIBUTE_DIRECTORY)
53bool mkdir(
const std::string &path) {
return _mkdir(path.c_str()) == 0; }
bool mkdir(const std::string &path)
bool is_dir(const std::string &path)
const std::string separator()
std::string normalize_path(const std::string &path)
Normalize compatible separator in path to default separator.