/*
shlwapi.h
shlwapi.lib
*/
void CAdsMngWnd::_checkAndcreateDirectory(const std::string DirPath)
{
std::string cs_tmp_dir;
int nfind = DirPath.find("//", 0);
while(nfind < DirPath.length())
{
if(nfind == -1)nfind = DirPath.length();
cs_tmp_dir = DirPath.substr(0, nfind);
if(!PathFileExists(cs_tmp_dir.c_str()))
::CreateDirectory(cs_tmp_dir.c_str(), NULL);
if(nfind < DirPath.length())
nfind = DirPath.find("//", ++nfind);
}
}
shlwapi.h
shlwapi.lib
*/
void CAdsMngWnd::_checkAndcreateDirectory(const std::string DirPath)
{
std::string cs_tmp_dir;
int nfind = DirPath.find("//", 0);
while(nfind < DirPath.length())
{
if(nfind == -1)nfind = DirPath.length();
cs_tmp_dir = DirPath.substr(0, nfind);
if(!PathFileExists(cs_tmp_dir.c_str()))
::CreateDirectory(cs_tmp_dir.c_str(), NULL);
if(nfind < DirPath.length())
nfind = DirPath.find("//", ++nfind);
}
}