fileinfo.h 2.4 KB

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