/* Open the file information on the DirHandle and verify that the Attribute includes EFI_FILE_DIRECTORY bit set. */
EFI_STATUS EFIAPI FileHandleIsDirectory(IN EFI_FILE_HANDLE DirHandle)
/* Open the file information on the DirHandle and verify that the Attribute includes EFI_FILE_DIRECTORY bit set. */
EFI_STATUS EFIAPI FileHandleIsDirectory(IN EFI_FILE_HANDLE DirHandle)
{
  EFI_FILE_INFO  *DirInfo;
  if (DirHandle == NULL) {
    return (EFI_INVALID_PARAMETER);
  }
  DirInfo = FileHandleGetInfo (DirHandle);
  if (DirInfo == NULL) {
    return (EFI_INVALID_PARAMETER);
  }
  if ((DirInfo->Attribute & EFI_FILE_DIRECTORY) == 0) {
    FreePool (DirInfo);
    return (EFI_NOT_FOUND);
  }
  FreePool (DirInfo);
  return (EFI_SUCCESS);
}