#ifndef _NTIOAPI_H
#if !defined(NTDDI_WIN11_GE) || (NTDDI_VERSION < NTDDI_WIN11_GE)
typedef struct _FILE_STAT_INFORMATION
{
    LARGE_INTEGER FileId;
    LARGE_INTEGER CreationTime;
    LARGE_INTEGER LastAccessTime;
    LARGE_INTEGER LastWriteTime;
    LARGE_INTEGER ChangeTime;
    LARGE_INTEGER AllocationSize;
    LARGE_INTEGER EndOfFile;
    ULONG FileAttributes;
    ULONG ReparseTag;
    ULONG NumberOfLinks;
    ACCESS_MASK EffectiveAccess;
} FILE_STAT_INFORMATION, *PFILE_STAT_INFORMATION;
View code on GitHub// ntifs.h
typedef struct _FILE_STAT_INFORMATION {
  LARGE_INTEGER FileId;
  LARGE_INTEGER CreationTime;
  LARGE_INTEGER LastAccessTime;
  LARGE_INTEGER LastWriteTime;
  LARGE_INTEGER ChangeTime;
  LARGE_INTEGER AllocationSize;
  LARGE_INTEGER EndOfFile;
  ULONG         FileAttributes;
  ULONG         ReparseTag;
  ULONG         NumberOfLinks;
  ACCESS_MASK   EffectiveAccess;
} FILE_STAT_INFORMATION, *PFILE_STAT_INFORMATION;
View the official Windows Driver Kit DDI referenceThis structure is documented in Windows Driver Kit.
FILE_STAT_INFORMATION contains metadata about a file.
FileIdSpecifies the id of a file.
CreationTimeSpecifies the creation time of a file.
LastAccessTimeSpecifies the last time a file was accessed.
LastWriteTimeSpecifies the last time a file was written to.
ChangeTimeSpecifies the last time a file was changed.
AllocationSizeFile allocation size, in bytes. Usually this value is a multiple of the sector or cluster size of the underlying physical device.
EndOfFileAbsolute new end-of-file position as a byte offset from the start of the file. EndOfFile specifies the byte offset to the end of the file. Because this value is zero-based, it actually refers to the first free byte in the file. In other words, EndOfFile is the offset to the byte immediately following the last valid byte in the file.
FileAttributesFile attributes, which can be any valid combination of the following:
| Attribute | Value | 
|---|---|
| FILE_ATTRIBUTE_READONLY | 0x00000001 | 
| FILE_ATTRIBUTE_HIDDEN | 0x00000002 | 
| FILE_ATTRIBUTE_SYSTEM | 0x00000004 | 
| FILE_ATTRIBUTE_DIRECTORY | 0x00000010 | 
| FILE_ATTRIBUTE_ARCHIVE | 0x00000020 | 
| FILE_ATTRIBUTE_NORMAL | 0x00000080 | 
ReparseTagReparse point tag. See About reparse points for more information.
NumberOfLinksSpecifies the number of links to the file.
EffectiveAccessSpecifies the access rights of the file.
NtQueryInformationByName and NtQueryInformationFile return information in a FILE_STAT_INFORMATION structure when their FileInformationClass parameter is FileStatInformation.