2.4. Getting and Setting File Information

The API contains several functions that are useful for retrieving file information. For example, you can find out when a file was last modified, how its attribute bits are currently set, and the size of the file. The following sections detail the different capabilities that are available. Several of these functions require an open file handle rather than the file's name. See the previous section or Section 2.7 for details on the CreateFile function.

2.4.1. Getting the File Times

The GetFileTime function retrieves three different pieces of time information from an open file: the Creation time, the Last Access time, and the Last Write time. The FAT file system supports only the last write time, but NTFS ...

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.