16 #define mkdir(dir_name, permission) _mkdir(dir_name)
21 const int path_len = strlen(path);
23 printf(
"Warning: Empty path for creating directory");
27 char* dirpath =
new char[path_len + 1];
28 strcpy(dirpath, path);
32 for (
char* p = dirpath + 1; *p; p++) {
37 if (mkdir(dirpath, S_IRWXU) != 0) {
45 if (mkdir(dirpath, S_IRWXU) != 0) {
46 if (errno != EEXIST) {