public boolean takeFullSnapshot(String snapshotDirPath, boolean flushBeforeSnapshot)
      throws DirectoryNotLegalException, IOException {
    File snapshotDir = new File(snapshotDirPath);
    String snapshotId = snapshotDir.getName();
    return takeFullSnapshot(snapshotDirPath, snapshotId, snapshotId, flushBeforeSnapshot);
  }
SnapshotTaker takes data snapshot for a DataRegion in one time. It does so by creating hard link
for files or copying them. SnapshotTaker supports two different ways of snapshot: Full Snapshot
and Incremental Snapshot. The former takes a snapshot for all files in an empty directory, and
the latter takes a snapshot based on the snapshot that took before.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/SnapshotTaker.java