public List<TsFileResource> getArrayList() {
    List<TsFileResource> list = new ArrayList<>();
    TsFileResource current = header;
    while (current != null) {
      list.add(current);
      current = current.next;
    }
    return list;
  }
insert tsFileResource to a target pos(targetPos = index) e.g. if index = 0, then to the first,
if index = 1, then to the second.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResourceList.java