一些常用的文件操作代码

建立名称为 dirPath的子目录。
#include <direct.h>
string dirPath = "Log/web_server_log";
#ifndef WIN32
mkdir(dirPath.c_str(), 0777);
#else
mkdir(dirPath.c_str());
#endif
原文地址:https://www.cnblogs.com/byfei/p/14104579.html