84 size_t pos = 0, idx = 0;
85 while (idx < pathname.size())
87 pos = pathname.find_first_of(
"/\\", idx);
88 if (pos == std::string::npos)
90 mkdir(pathname.c_str(), 0777);
93 std::string parent_dir = pathname.substr(0, pos + 1);
94 if (
exists(parent_dir) ==
true)
99 mkdir(parent_dir.c_str(), 0777);