@SuppressWarnings("squid:S106")
  public static void main(String[] args) throws IOException {

    String folder = "data/data/sequence/root.group_1/0";
    if (args.length >= 1) {
      folder = args[0];
    }
    File folderFile = SystemFileFactory.INSTANCE.getFile(folder);
    if (folderFile.isDirectory()) {
      // analyze the tsfile.resource files from a folder
      File[] files =
          FSFactoryProducer.getFSFactory()
              .listFilesBySuffix(folderFile.getAbsolutePath(), ".tsfile.resource");
      Arrays.sort(files, Comparator.comparingLong(x -> Long.valueOf(x.getName().split("-")[0])));

      for (File file : files) {
        printResource(file.getAbsolutePath());
      }
      System.out.println("Analyzing the resource file folder " + folder + " finished.");
    } else {
      // analyze a tsfile.resource file
      printResource(folderFile.getAbsolutePath());
      System.out.println("Analyzing the resource file " + folder + " finished.");
    }
  }
This tool can analyze the tsfile.resource files from a folder, or analyze a single
tsfile.resource file.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileResourcePrinter.java