[C++] 检测目录是否存在 Targ:windows MFC →→→→→进入此内容的聊天室

来自 , 2019-08-12, 写在 C++, 查看 127 次.
URL http://www.code666.cn/view/6a508a60
  1. bool  CheckFolderExist(CString &strPath)//检测目录是否存在
  2. {
  3.     WIN32_FIND_DATA  wfd;
  4.     bool rValue = false;
  5.     HANDLE hFind = FindFirstFile(strPath, &wfd);
  6.     if ((hFind != INVALID_HANDLE_VALUE) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
  7.     {
  8.         rValue = true;  
  9.     }
  10.     FindClose(hFind);
  11.     return rValue;
  12. }

回复 "检测目录是否存在 Targ:windows MFC"

这儿你可以回复上面这条便签

captcha