ifstream in(path_buf, ios::in);
istreambuf_iterator<char> beg(in), end;
string strdata(beg, end);
bool CheckFolderExist(const string &strPath)
{
WIN32_FIND_DATA wfd;
bool rValue = false;
HANDLE hFind = FindFirstFile(strPath.c_str(), &wfd);
if ((hFind != INVALID_HANDLE_VALUE) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
rValue = true;
}
FindClose(hFind);
return rValue;
}
strDbPath += "data";
if (!CheckFolderExist(strDbPath))
{
_mkdir(strDbPath.c_str());
}
c++ 读取整个文件内容 || VC 检查创建文件夹
最新推荐文章于 2020-06-16 07:31:48 发布