/* This function gets the file information from an open file descriptor, and stores it in a buffer allocated from pool. */
EFI_FILE_INFO* FileInfo(IN EFI_FILE_HANDLE FHand)
/* This function gets the file information from an open file descriptor, and stores it in a buffer allocated from pool. */
EFI_FILE_INFO* FileInfo(IN EFI_FILE_HANDLE FHand)
{
  EFI_STATUS     Status;
  EFI_FILE_INFO  *Buffer;
  UINTN          BufferSize;
  Buffer     = NULL;
  BufferSize = SIZE_OF_EFI_FILE_INFO + 200;
  while (GrowBuffer (&Status, (VOID **)&Buffer, BufferSize)) {
    Status = FHand->GetInfo (
                      FHand,
                      &gEfiFileInfoGuid,
                      &BufferSize,
                      Buffer
                      );
  }
  return Buffer;
}