public synchronized Path copyFile(final Path target) throws IOException {
    if (!Files.exists(target.getParent())) {
      Files.createDirectories(target.getParent());
    }
    return RetryUtils.retryOnException(
        () ->
            Files.copy(
                getPath(),
                target,
                StandardCopyOption.REPLACE_EXISTING,
                StandardCopyOption.COPY_ATTRIBUTES));
  }
@param target the path to the target file
@return the path to the target file
@throws IOException if an I/O error occurs
iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionFileHandler.java