@Override
    public LocatedFileStatus next() throws IOException {
      if (!hasNext()) {
        throw new NoSuchElementException();
      }
      LocatedFileStatus result = nextFile;
      findNext();
      return result;
    }
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