1 /** @file 2 Provides a GUID and a data structure that can be used with EFI_FILE_PROTOCOL.SetInfo() 3 and EFI_FILE_PROTOCOL.GetInfo() to set or get generic file information. 4 This GUID is defined in UEFI specification. 5 6 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 7 This program and the accompanying materials are licensed and made available under 8 the terms and conditions of the BSD License that accompanies this distribution. 9 The full text of the license may be found at 10 http://opensource.org/licenses/bsd-license.php. 11 12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 15 **/ 16 17 #ifndef __FILE_INFO_H__ 18 #define __FILE_INFO_H__ 19 20 FILE_LICENCE ( BSD3 ); 21 22 #define EFI_FILE_INFO_ID \ 23 { \ 24 0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ 25 } 26 27 typedef struct { 28 /// 29 /// The size of the EFI_FILE_INFO structure, including the Null-terminated FileName string. 30 /// 31 UINT64 Size; 32 /// 33 /// The size of the file in bytes. 34 /// 35 UINT64 FileSize; 36 /// 37 /// PhysicalSize The amount of physical space the file consumes on the file system volume. 38 /// 39 UINT64 PhysicalSize; 40 /// 41 /// The time the file was created. 42 /// 43 EFI_TIME CreateTime; 44 /// 45 /// The time when the file was last accessed. 46 /// 47 EFI_TIME LastAccessTime; 48 /// 49 /// The time when the file's contents were last modified. 50 /// 51 EFI_TIME ModificationTime; 52 /// 53 /// The attribute bits for the file. 54 /// 55 UINT64 Attribute; 56 /// 57 /// The Null-terminated name of the file. 58 /// 59 CHAR16 FileName[1]; 60 } EFI_FILE_INFO; 61 62 /// 63 /// The FileName field of the EFI_FILE_INFO data structure is variable length. 64 /// Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to 65 /// be the size of the data structure without the FileName field. The following macro 66 /// computes this size correctly no matter how big the FileName array is declared. 67 /// This is required to make the EFI_FILE_INFO data structure ANSI compilant. 68 /// 69 #define SIZE_OF_EFI_FILE_INFO OFFSET_OF (EFI_FILE_INFO, FileName) 70 71 extern EFI_GUID gEfiFileInfoGuid; 72 73 #endif 74