protected boolean isDirectory(FileSystem fs, @CheckForNull Boolean isDir, Path p)
    throws IOException {
    return isDir != null ? isDir : fs.isDirectory(p);
  }
Filters out a path. Can be given an optional directory hint to avoid filestatus lookup.
@param p     A filesystem path
@param isDir An optional boolean indicating whether the path is a directory or not
@return true if the path is accepted, false if the path is filtered out
hbase-server/src/main/java/org/apache/hadoop/hbase/util/AbstractFileStatusFilter.java