From PhoenixWiki

Jump to: navigation, search

Provides a GUID and a data structure that can be used with SetInfo() and GetInfo() to set or get generic file information.



#define EFI_FILE_INFO_ID \



extern EFI_GUID gEfiFileInfoGuid;
typedef struct {
  UINT64   Size;
  UINT64   FileSize;
  UINT64   PhysicalSize;
  EFI_TIME CreateTime;
  EFI_TIME LastAccessTime;
  EFI_TIME ModificationTime;
  UINT64   Attribute;
//CHAR16   FileName[];


Member Description
Size Size of the EFI_FILE_INFO structure, including the Null-terminated FileName string.
FileSize The size of the file in bytes.
PhysicalSize The amount of physical space the file consumes on the file system volume.
CreateTime The time the file was created.
LastAccessTime The time when the file was last accessed.
ModificationTime The time when the file’s contents were last modified.
Attribute The attribute bits for the file.
#define EFI_FILE_READ_ONLY 0x0000000000000001
#define EFI_FILE_HIDDEN 0x0000000000000002
#define EFI_FILE_SYSTEM 0x0000000000000004
#define EFI_FILE_RESERVED 0x0000000000000008
#define EFI_FILE_DIRECTORY 0x0000000000000010
#define EFI_FILE_ARCHIVE 0x0000000000000020
#define EFI_FILE_VALID_ATTR 0x0000000000000037
FileName The Null-terminated name of the file.


The EFI_FILE_INFO data structure supports GetInfo() and SetInfo() requests. In the case of SetInfo(), the following additional rules apply:

  • On directories, the file size is determined by the contents of the directory and cannot be changed by setting FileSize. On directories, FileSize is ignored during a SetInfo().
  • The PhysicalSize is determined by the FileSize and cannot be changed. This value is ignored during a SetInfo() request.
  • The EFI_FILE_DIRECTORY attribute bit cannot be changed. It must match the file’s actual type.
  • A value of zero in CreateTime, LastAccess, or ModificationTime causes the fields to be ignored (and not updated).

Copyright (C) 2008 Phoenix Technologies Ltd. All Rights Reserved. Portions copyright (C) 2008 UEFI Forum, Inc. Used with permission.

Personal tools