public static List<Path> getRegionDirs(final FileSystem fs, final Path tableDir)
    throws IOException {
    // assumes we are in a table dir.
    List<FileStatus> rds = listStatusWithStatusFilter(fs, tableDir, new RegionDirFilter(fs));
    if (rds == null) {
      return Collections.emptyList();
    }
    List<Path> regionDirs = new ArrayList<>(rds.size());
    for (FileStatus rdfs : rds) {
      Path rdPath = rdfs.getPath();
      regionDirs.add(rdPath);
    }
    return regionDirs;
  }
Given a particular table dir, return all the regiondirs inside it, excluding files such as
.tableinfo
@param fs       A file system for the Path
@param tableDir Path to a specific table directory &lt;hbase.rootdir&gt;/&lt;tabledir&gt;
@return List of paths to valid region directories in table dir.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java