BOOL TPubTools::FolderExist(const CString &strPath)
{
WIN32_FIND_DATA wfd;
HANDLE hFind;
BOOL bRet = FALSE;

hFind = FindFirstFile(strPath, &wfd);

if (hFind != INVALID_HANDLE_VALUE)
{
if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
bRet = TRUE;
}

FindClose(hFind);
}

return bRet;
}

 

BOOL TPubTools::FileExist(const CString &strPath)
{
WIN32_FIND_DATA wfd;
HANDLE hFind;
BOOL bRet = FALSE;

hFind = FindFirstFile(strPath, &wfd);

if (hFind != INVALID_HANDLE_VALUE)
{
if (!(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
bRet = TRUE;
}

FindClose(hFind);
}

return bRet;
}

 

相关文章:

  • 2021-12-20
  • 2021-10-23
  • 2021-09-29
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-12
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2021-08-16
相关资源
相似解决方案