The
dwFileAttributes
could keep zero, one or more flags and they are combined together using the
or operator.
In your case
dwFileAttributes = 48 = FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_DIRECTORY
.
If you want to check if an entry is a file or a folder, as in your code snippet, you should do it as shown below:
WIN32_FIND_DATA FileData
handle = FindFirstFile(path, &FileData);
if ((FileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0)
{
}