@Override
    protected boolean accept(Path p, @CheckForNull Boolean isDir) {
      try {
        return isFile(fs, isDir, p);
      } catch (IOException e) {
        LOG.warn("Unable to verify if path={} is a regular file", p, e);
        return false;
      }
    }
A {@link PathFilter} that returns only regular files.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java