VC++判断指定的路径是文件还是目录
//strPath为需要判断的路径
//http://www.75271.com
if ( GetFileAttributes(strPath) & FILE_ATTRIBUTE_DIRECTORY )
{
MessageBox("Is a Directory");
}
else
{
MessageBox("Is not a Directory");
}
VC++判断指定的路径是文件还是目录
//strPath为需要判断的路径
//http://www.75271.com
if ( GetFileAttributes(strPath) & FILE_ATTRIBUTE_DIRECTORY )
{
MessageBox("Is a Directory");
}
else
{
MessageBox("Is not a Directory");
}