#include <dirent.h> debug_path = "./debug/"; DIR *dir; if((dir=opendir(debug_path.c_str())) == NULL){ system("mkdir -p ./debug/"); //如果没有当前目录就创建当前目录 }
system("rm -rf ./Result"); //删除文件夹
system("mkdir -p ./Result"); //创建文件夹
https://blog.csdn.net/jay463261929/article/details/54378480