iPXE
FileInfo.h
Go to the documentation of this file.
00001 /** @file
00002   Provides a GUID and a data structure that can be used with EFI_FILE_PROTOCOL.SetInfo()
00003   and EFI_FILE_PROTOCOL.GetInfo() to set or get generic file information.
00004   This GUID is defined in UEFI specification.
00005 
00006 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
00007 This program and the accompanying materials are licensed and made available under
00008 the terms and conditions of the BSD License that accompanies this distribution.
00009 The full text of the license may be found at
00010 http://opensource.org/licenses/bsd-license.php.
00011 
00012 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
00013 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
00014 
00015 **/
00016 
00017 #ifndef __FILE_INFO_H__
00018 #define __FILE_INFO_H__
00019 
00020 FILE_LICENCE ( BSD3 );
00021 
00022 #define EFI_FILE_INFO_ID \
00023   { \
00024     0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
00025   }
00026 
00027 typedef struct {
00028   ///
00029   /// The size of the EFI_FILE_INFO structure, including the Null-terminated FileName string.
00030   ///
00031   UINT64    Size;
00032   ///
00033   /// The size of the file in bytes.
00034   ///
00035   UINT64    FileSize;
00036   ///
00037   /// PhysicalSize The amount of physical space the file consumes on the file system volume.
00038   ///
00039   UINT64    PhysicalSize;
00040   ///
00041   /// The time the file was created.
00042   ///
00043   EFI_TIME  CreateTime;
00044   ///
00045   /// The time when the file was last accessed.
00046   ///
00047   EFI_TIME  LastAccessTime;
00048   ///
00049   /// The time when the file's contents were last modified.
00050   ///
00051   EFI_TIME  ModificationTime;
00052   ///
00053   /// The attribute bits for the file.
00054   ///
00055   UINT64    Attribute;
00056   ///
00057   /// The Null-terminated name of the file.
00058   ///
00059   CHAR16    FileName[1];
00060 } EFI_FILE_INFO;
00061 
00062 ///
00063 /// The FileName field of the EFI_FILE_INFO data structure is variable length.
00064 /// Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
00065 /// be the size of the data structure without the FileName field.  The following macro
00066 /// computes this size correctly no matter how big the FileName array is declared.
00067 /// This is required to make the EFI_FILE_INFO data structure ANSI compilant.
00068 ///
00069 #define SIZE_OF_EFI_FILE_INFO OFFSET_OF (EFI_FILE_INFO, FileName)
00070 
00071 extern EFI_GUID gEfiFileInfoGuid;
00072 
00073 #endif