@Override
  public boolean isDirectory(String location) {
    return tableMetaStore.doAs(
        () -> {
          Path path = new Path(location);
          FileSystem fs = getFs(path);

          try {
            return fs.isDirectory(path);
          } catch (IOException e) {
            throw new UncheckedIOException("Fail to check file directory for %s", e);
          }
        });
  }
Implementation of {@link AuthenticatedFileIO} for hadoop file system with authentication.
amoro-format-iceberg/src/main/java/org/apache/amoro/io/AuthenticatedHadoopFileIO.java