/* Open the NvVars file for reading or writing */
VOID NvVarsFileReadCheckup(IN EFI_FILE_HANDLE File, OUT BOOLEAN *Exists, OUT UINTN *Size)
/* Open the NvVars file for reading or writing */
VOID NvVarsFileReadCheckup(IN EFI_FILE_HANDLE File, OUT BOOLEAN *Exists, OUT UINTN *Size)
{
  EFI_FILE_INFO  *FileInfo;
  *Exists = FALSE;
  *Size   = 0;
  FileInfo = FileHandleGetInfo (File);
  if (FileInfo == NULL) {
    return;
  }
  if ((FileInfo->Attribute & EFI_FILE_DIRECTORY) != 0) {
    FreePool (FileInfo);
    return;
  }
  *Exists = TRUE;
  *Size   = (UINTN)FileInfo->FileSize;
  FreePool (FileInfo);
}