Skip to content

Commit

Permalink
Implement directory creation on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Brzozowski committed Jul 13, 2018
1 parent ae145cd commit 6bb05d0
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions directory_path.cpp
Expand Up @@ -27,20 +27,15 @@ bool DirectoryPath::exists() const {
return isDirectory(get());
}

#ifndef WINDOWS
#include <sys/stat.h>
#include <sys/types.h>
void DirectoryPath::createIfDoesntExist() const {
if (!exists()) {
#ifndef WINDOWS
USER_CHECK(!mkdir(path.data(), 0750)) << "Unable to create directory \"" + path + "\": " + strerror(errno);
}
}
#else

implement

USER_CHECK(!mkdir(path.data())) << "Unable to create directory \"" + path + "\": " + strerror(errno);
#endif

}
}

static bool isRegularFile(const string& path) {
struct stat path_stat;
Expand Down

0 comments on commit 6bb05d0

Please sign in to comment.