@Override
  public void clear() throws IOException, MetadataException {
    pageManager.clear();
    pageManager.close();
    channel.close();
    if (pmtFile.exists()) {
      Files.delete(Paths.get(pmtFile.toURI()));
    }
    pmtFile.createNewFile();

    channel = new RandomAccessFile(pmtFile, "rw").getChannel();
    headerContent = ByteBuffer.allocate(SchemaFileConfig.FILE_HEADER_SIZE);
    initFileHeader();
  }
This class is mainly aimed to manage space all over the file.

<p>This class is meant to open a .pst(Persistent mTree) file, and maintains the header of the
file. It Loads or writes a page length bytes at once, with an 32 bits int to index a page inside
a file. Use SlottedFile to manipulate segment(sp) inside a page(an array of bytes).
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/SchemaFile.java