fileinfo.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*++
  2. Copyright (c) 2014 Minoca Corp.
  3. This file is licensed under the terms of the GNU General Public License
  4. version 3. Alternative licensing terms are available. Contact
  5. info@minocacorp.com for details. See the LICENSE file at the root of this
  6. project for complete licensing information.
  7. Module Name:
  8. fileinfo.h
  9. Abstract:
  10. This header contains definitions for EFI File information.
  11. Author:
  12. Evan Green 13-Mar-2014
  13. --*/
  14. //
  15. // ------------------------------------------------------------------- Includes
  16. //
  17. //
  18. // --------------------------------------------------------------------- Macros
  19. //
  20. //
  21. // The file name field of the EFI_FILE_INFO data structure is variable length.
  22. // Whenever code needs to know the size of the EFI_FILE_INFO data structure, it
  23. // needs to be the size of the data structure without the file name field.
  24. // The following macro computes this size correctly no matter how big the file
  25. // name array is declared. This is required to make the EFI_FILE_INFO data
  26. // structure ANSI compilant.
  27. //
  28. #define SIZE_OF_EFI_FILE_INFO OFFSET_OF(EFI_FILE_INFO, FileName)
  29. //
  30. // ---------------------------------------------------------------- Definitions
  31. //
  32. #define EFI_FILE_INFO_ID \
  33. { \
  34. 0x9576E92, 0x6D3F, 0x11D2, \
  35. {0x8E, 0x39, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} \
  36. }
  37. //
  38. // ------------------------------------------------------ Data Type Definitions
  39. //
  40. /*++
  41. Structure Description:
  42. This structure defines EFI file information.
  43. Members:
  44. Size - Stores the size of the EFI_FILE_INFO structure, including the
  45. null-terminated file name string.
  46. FileSize - Stores the size of the file in bytes.
  47. PhysicalSize - Stores the amount of physical space the file consumes on the
  48. file system volume.
  49. CreateTime - Stores the time the file was created.
  50. LastAccessTime - Stores the time when the file was last accessed.
  51. ModificationTime - Stores the time when the file's contents were last
  52. modified.
  53. Attribute - Stores the attribute bits for the file.
  54. FileName - Stores the null-terminated name of the file.
  55. --*/
  56. typedef struct {
  57. UINT64 Size;
  58. UINT64 FileSize;
  59. UINT64 PhysicalSize;
  60. EFI_TIME CreateTime;
  61. EFI_TIME LastAccessTime;
  62. EFI_TIME ModificationTime;
  63. UINT64 Attribute;
  64. CHAR16 FileName[1];
  65. } EFI_FILE_INFO;
  66. //
  67. // -------------------------------------------------------------------- Globals
  68. //
  69. //
  70. // -------------------------------------------------------- Function Prototypes
  71. //