]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Guid/FileInfo.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Guid / FileInfo.h
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 - 2018, Intel Corporation. All rights reserved.<BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9 **/
10
11 #ifndef __FILE_INFO_H__
12 #define __FILE_INFO_H__
13
14 #define EFI_FILE_INFO_ID \
15 { \
16 0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
17 }
18
19 typedef struct {
20 ///
21 /// The size of the EFI_FILE_INFO structure, including the Null-terminated FileName string.
22 ///
23 UINT64 Size;
24 ///
25 /// The size of the file in bytes.
26 ///
27 UINT64 FileSize;
28 ///
29 /// PhysicalSize The amount of physical space the file consumes on the file system volume.
30 ///
31 UINT64 PhysicalSize;
32 ///
33 /// The time the file was created.
34 ///
35 EFI_TIME CreateTime;
36 ///
37 /// The time when the file was last accessed.
38 ///
39 EFI_TIME LastAccessTime;
40 ///
41 /// The time when the file's contents were last modified.
42 ///
43 EFI_TIME ModificationTime;
44 ///
45 /// The attribute bits for the file.
46 ///
47 UINT64 Attribute;
48 ///
49 /// The Null-terminated name of the file.
50 ///
51 CHAR16 FileName[1];
52 } EFI_FILE_INFO;
53
54 ///
55 /// The FileName field of the EFI_FILE_INFO data structure is variable length.
56 /// Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
57 /// be the size of the data structure without the FileName field. The following macro
58 /// computes this size correctly no matter how big the FileName array is declared.
59 /// This is required to make the EFI_FILE_INFO data structure ANSI compilant.
60 ///
61 #define SIZE_OF_EFI_FILE_INFO OFFSET_OF (EFI_FILE_INFO, FileName)
62
63 extern EFI_GUID gEfiFileInfoGuid;
64
65 #endif