private void writeRegionInfoOnFilesystem(boolean useTempDir) throws IOException {
    byte[] content = getRegionInfoFileContent(regionInfoForFs);
    writeRegionInfoOnFilesystem(content, useTempDir);
  }
Write out an info file under the region directory. Useful recovering mangled regions.
@param useTempDir indicate whether or not using the region .tmp dir for a safer file creation.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java