37 std::filesystem::path
const& target_path) {
39 std::filesystem::path clean_path =
40 (std::filesystem::path(target_path) /
"foo").parent_path();
42 if (!std::filesystem::exists(clean_path.parent_path())) {
47 std::filesystem::path path_attempt;
50 }
while (std::filesystem::exists(path_attempt));
51 if (!std::filesystem::create_directory(path_attempt)) {
62 char template_str[] =
"/tmp/farm-ng-XXXXXX";
63 char* directory_str = mkdtemp(template_str);
64 if (directory_str ==
nullptr) {