Retrieves attributes for a specified file or directory. It is similar to GetFileAttributes, but it returns more information - in addition to attributes, it also returns various file times and file size.
BOOL GetFileAttributesEx( LPCSTR lpcszFilename, int nInfoLevel, WIN32_FILE_ATTRIBUTE_DATA * lpFileInfo )
Returns FALSE if file sepcified is not a valid file name or directory name
Returns TRUE if succeed
EX1
int GetFileAttributesEx_ex1() { string filename = "c:\\config.sys"; WIN32_FILE_ATTRIBUTE_DATA fileInfo; if(GetFileAttributesEx(filename, 0, &fileInfo)) { int nSize = fileInfo.nFileSizeLow; out_int("File size=", nSize); } else out_str("file not found"); return 1; }
GetFileAttributes
origin.h