I can get the created date, file size, etc. for the file using the following code:
HANDLE hFile = CreateFile(path, GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
LARGE_INTEGER fileSize;
GetFileSizeEx(hFile, &fileSize);
FILE_BASIC_INFO fileInfo);
GetFileInformationByHandle(hFile, FileBasicInfo, fileInfo, sizeof(fileInfo));
But when called against a directory, all values are zero - how do I get directory information?
thank
source
share