Skip to content

Latest commit

 

History

History
141 lines (95 loc) · 5.12 KB

ns-ntifs-file_id_extd_dir_information.md

File metadata and controls

141 lines (95 loc) · 5.12 KB
UID title ms.date tech.root targetos description req.construct-type req.ddi-compliance req.dll req.header req.include-header req.kmdf-ver req.lib req.max-support req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.typenames req.umdf-ver req.unicode-ansi topic_type api_type api_location api_name f1_keywords dev_langs
NS:ntifs._FILE_ID_EXTD_DIR_INFORMATION
FILE_ID_EXTD_DIR_INFORMATION
07/26/2022
ifsk
Windows
Learn more about the FILE_ID_EXTD_DIR_INFORMATION structure.
structure
ntifs.h
Windows 8.1
FILE_ID_EXTD_DIR_INFORMATION, *PFILE_ID_EXTD_DIR_INFORMATION
apiref
HeaderDef
ntifs.h
_FILE_ID_EXTD_DIR_INFORMATION
PFILE_ID_EXTD_DIR_INFORMATION
FILE_ID_EXTD_DIR_INFORMATION
_FILE_ID_EXTD_DIR_INFORMATION
ntifs/_FILE_ID_EXTD_DIR_INFORMATION
PFILE_ID_EXTD_DIR_INFORMATION
ntifs/PFILE_ID_EXTD_DIR_INFORMATION
FILE_ID_EXTD_DIR_INFORMATION
ntifs/FILE_ID_EXTD_DIR_INFORMATION
c++

FILE_ID_EXTD_DIR_INFORMATION structure

-description

The FILE_ID_EXTD_DIR_INFORMATION structure is used to query 128-bit file reference number information for the files in a directory.

-struct-fields

-field NextEntryOffset

Byte offset of the next FILE_ID_EXTD_DIR_INFORMATION entry, if multiple entries are present in a buffer. This member is zero if no other entries follow this one.

-field FileIndex

Byte offset of the file within the parent directory. This member is undefined for file systems, such as NTFS, in which the position of a file within the parent directory is not fixed and can be changed at any time to maintain sort order.

-field CreationTime

Time when the file was created.

-field LastAccessTime

Last time the file was accessed.

-field LastWriteTime

Last time information was written to the file.

-field ChangeTime

Last time the file was changed.

-field EndOfFile

Absolute 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.

-field AllocationSize

File allocation size, in bytes. Usually, this value is a multiple of the sector or cluster size of the underlying physical device.

-field FileAttributes

File attributes, which can be any valid combination of the following:

  • FILE_ATTRIBUTE_READONLY
  • FILE_ATTRIBUTE_HIDDEN
  • FILE_ATTRIBUTE_SYSTEM
  • FILE_ATTRIBUTE_DIRECTORY
  • FILE_ATTRIBUTE_ARCHIVE
  • FILE_ATTRIBUTE_NORMAL
  • FILE_ATTRIBUTE_TEMPORARY
  • FILE_ATTRIBUTE_COMPRESSED

-field FileNameLength

Specifies the length of the file name string, in bytes.

-field EaSize

Combined length, in bytes, of the extended attributes (EA) for the file.

-field ReparsePointTag

Tag value for the reparse point.

-field FileId

The 128-bit file reference number for the file. This number is generated and assigned to the file by the file system.

-field FileName

Specifies the first character of the file name string. This is followed in memory by the remainder of the string.

-remarks

This information can be queried in either of the following ways:

  • Call ZwQueryDirectoryFile, passing FileIdExtdDirectoryInformation as the value of FileInformationClass and passing a caller-allocated, FILE_ID_EXTD_DIR_INFORMATION-structured buffer as the value of FileInformation.

  • Create an IRP with major function code IRP_MJ_DIRECTORY_CONTROL and minor function code IRP_MN_QUERY_DIRECTORY.

No specific access rights are required to query this information.

File reference numbers, also called file IDs, are guaranteed to be unique only within a static file system. They aren't guaranteed to be unique over time because file systems are free to reuse them, nor are they guaranteed to remain constant. For example, the FAT file system generates the file reference number for a file from the byte offset of the file's directory entry record (DIRENT) on the disk. Defragmentation can change this byte offset. Thus a FAT file reference number can change over time.

All dates and times are in absolute system-time format. Absolute system time is the number of 100-nanosecond intervals since the start of the year 1601.

This structure must be aligned on a LONGLONG (8-byte) boundary. If a buffer contains two or more of these structures, the NextEntryOffset value in each entry, except the last, falls on an 8-byte boundary.

-see-also

FILE_INFORMATION_CLASS

FsRtlNotifyFullChangeDirectory

IRP_MJ_DIRECTORY_CONTROL

ZwQueryDirectoryFile