bool CheckFolderExist(CString &strPath) //检测目录是否存在 |
{ |
WIN32_FIND_DATA wfd; |
bool rValue = false ; |
HANDLE hFind = FindFirstFile(strPath, &wfd); |
if ((hFind != INVALID_HANDLE_VALUE) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) |
{ |
rValue = true ; |
} |
FindClose(hFind); |
return rValue; |
} |