@Override
    public boolean hasNext() throws IOException {
      return nextFile != null;
    }
This works with {@link RemoteIterator} which (potentially) produces all files recursively
so looking for hidden folders must look at whole path, not just the the last part of it as
would be appropriate w/o recursive listing.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/FileUtils.java