1 out of 1 rated this helpful - Rate this topic

FILE_BASIC_INFO structure

Applies to: desktop apps | Metro style apps

Contains the basic information for a file. Used for file handles.

Syntax

typedef struct _FILE_BASIC_INFO {
  LARGE_INTEGER CreationTime;
  LARGE_INTEGER LastAccessTime;
  LARGE_INTEGER LastWriteTime;
  LARGE_INTEGER ChangeTime;
  DWORD         FileAttributes;
} FILE_BASIC_INFO, *PFILE_BASIC_INFO;

Members

CreationTime

The time the file was created.

LastAccessTime

The time the file was last accessed.

LastWriteTime

The time the file was last written to.

ChangeTime

The time the file was changed.

FileAttributes

The file attributes. For a list of attributes, see File Attribute Constants. If this is set to 0 in a FILE_BASIC_INFO structure passed to SetFileInformationByHandle then none of the attributes are changed.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Redistributable

Windows SDK on Windows Server 2003 and Windows XP.

Header

WinBase.h (include Windows.h);
FileExtd.h on Windows Server 2003 and Windows XP

See also

FILE_INFO_BY_HANDLE_CLASS
GetFileAttributes
GetFileInformationByHandleEx
SetFileInformationByHandle

 

 

Send comments about this topic to Microsoft

Build date: 4/17/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Where are the FileAttributes flags defined and/or documented for VC?
The information seems to be available here via .NET (see community comment for values), but I'd rather have a C header to refer to in my code:

http://msdn2.microsoft.com/en-us/library/system.io.fileattributes.aspx
Special meaning for certain values...

Specifying zero for any of the values will cause that value to not be updated.

Specifying -1 for LastAccessTime, ChangeTime, or LastWriteTime indicates that operations on the current handle should not affect the given field.  (I.e, specifying -1 for LastWriteTime will leave the LastWriteTime unaffected by writes performed on the current handle.)

This behavior is documented in the WDK, Installable File System section.