
#include <sys/stat.h>
#include <sys/types.h>
#include <iostream>
#include <stdio.h>
#include <unistd.h>
using namespace std;
int main()
{
string folderPath = "./data";
if (access(folderPath.c_str(), 0) == -1)
{
mkdir(folderPath.c_str(), S_IRUSR | S_IWUSR | S_IXUSR | S_IRWXG | S_IRWXO); // 返回 0 表示创建成功,-1 表示失败
}
return 0;
}




近期评论