WIN32_FIND_DATA
WIN32_FIND_DATA is used by FsFindFirst and FsFindNext. It is defined in the Windows SDK.
Declaration:
typedef struct _WIN32_FIND_DATA {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
TCHAR cFileName[ MAX_PATH ];
TCHAR cAlternateFileName[ 14 ];
} WIN32_FIND_DATA, *PWIN32_FIND_DATA;
Total Commander currently uses the following struct members:
dwFileAttributes File attributes. Use at least the FILE_ATTRIBUTE_DIRECTORY flag to distinguish between files and directories. Links should be returned as files.
ftCreationTime Currently unused. If available, set to the time when the file was created.
ftLastAccessTime Currently unused. If available, set to the time when the file was last accessed.
ftLastWriteTime Time stamp shown in the Total Commander file list, and copied with files. Use the following settings for files which don't have a time:
ftLastWriteTime.dwHighDateTime=0xFFFFFFFF;
ftLastWriteTime.dwLowDateTime=0xFFFFFFFE;
nFileSizeHigh High DWORD of file size
nFileSizeLow Low DWORD of file size
dwReserved0 On Unix systems, you can | (or) the dwFileAttributes field with 0x80000000 and set the dwReserved0 parameter to the Unix file mode (permissions). These will then be shown in Totalcmd can can be changed through Files - Change attributes.
dwReserved1 Unused, must be set to 0. Reserved for future plugin enhancements.
cFileName Local file name relative to the directory (without the path)
cAlternateFileName DOS-style file name (optional), set first char to 0 if unused.
Important note:
You should fill the whole struct with zeroes before filling in the fields, e.g. with memset(FindData,0,sizeof(WIN32_FIND_DATA));