FILEFINDBUF2

typedef struct _FILEFINDBUF2 { /* findbuf2 */

FDATE fdateCreation;

FTIME ftimeCreation;

FDATE fdateLastAccess;

FTIME ftimeLastAccess;

FDATE fdateLastWrite;

FTIME ftimeLastWrite;

ULONG cbFile;

ULONG cbFileAlloc;

USHORT attrFile;

ULONG cbList;

UCHAR cchName;

CHAR achName[CCHMAXPATHCOMP];

} FILEFINDBUF2;

The FILEFINDBUF2 structure contains file information.

Members

fdateCreation

Specifies the date the file was created.

ftimeCreation

Specifies the time the file was created.

fdateLastAccess

Specifies the date the file was last opened.

ftimeLastAccess

Specifies the time the file was last opened.

fdateLastWrite

Specifies the date the file was last written to.

ftimeLastWrite

Specifies the time the file was last written to.

cbFile

Specifies the size (in bytes) of the file.

cbFileAlloc

Specifies the number of bytes allocated for the file on the storage device.

attrFile

Specifies the file attributes. This member can be a combination of the following values.

Value Meaning

0 File can be read from or written to.
1 File can be read from but not written to.
2 File or directory is hidden and does not appear in a directory listing.
4 File or directory is a system file.
8 Filename is the current volume label for the media.
16 Filename identifies a directory not a file.
32 File has been archived.

cbList

Specifies the size (in bytes) of the buffer for extended attributes.

cchName

Specifies the number of characters in the filename.

achName

Specifies the name of the file. This member contains a null-terminated filename having the number of characters specified by the cchName member.

Comments

File Manager uses the values in the fdateLastWrite and ftimeLastWrite members when it displays the date and time for a given file; it ignores the other date and time values. Also, File Manager use the cbFile member as the file size, ignoring cbFileAlloc and cbList.

File Manager assumes that the achName member is truncated to just the length of the filename and the zero terminator. For example, if another FILEFINDBUF2 structure immediately follows the first, the pointer to the second structure is computed as follows:

(PFILEFINDBUF2)((LPSTR)lpFindBuf + sizeof(FILEFINDBUF2) -

CCHMAXPATHCOMP + lpFindBuf->cchName + 1)

See Also

LFNFindFirst