更新时间:2022-04-27 00:14:45
做这样的事情:
BOOL DirectoryExists(LPCTSTR szPath)
{
DWORD dwAttrib = GetFileAttributes(szPath);
return (dwAttrib != INVALID_FILE_ATTRIBUTES &&
(dwAttrib & FILE_ATTRIBUTE_DIRECTORY));
}
GetFileAttributes() 方法包含在 Kernel32 中.dll.
The GetFileAttributes() method is included in Kernel32.dll.