void VNDispatcher::initDataDir() { CString cstrDir; TCHAR cBuffer[260]; GetCurrentDirectory(MAX_PATH, cBuffer); CString cstrPath(cBuffer); if (FolderExist(cstrPath + _T("\\data"))) { cstrDir = cstrPath; } else { int nCount = cstrPath.ReverseFind(_T('\\')); cstrPath.Delete(nCount, cstrPath.GetLength() - nCount); if (FolderExist(cstrPath + _T("\\data"))) { cstrDir = cstrPath; } else { MyMessageBox_Error(_T("initDataDir")); return; } } cstrDir += _T("\\data\\"); m_strDataDirectory = cstrDir; }
void IMVLFile::RmFolder(const string& dir) { CleanFolder(dir); if (FolderExist(dir)) ; //RunProgram("Cmd.exe", format("/c rmdir /s /q \"%s\"", _S(dir)), true, false); }
void CmFile::RmFolder(CStr& dir) { CleanFolder(dir); if (FolderExist(dir)) RunProgram("Cmd.exe", format("/c rmdir /s /q \"%s\"", _S(dir)), true, false); }