@Override
  public void moveFileToTrash(String path) {
    try {
      Preconditions.checkArgument(
          !fileIO.supportFileSystemOperations() || !fileIO.asFileSystemIO().isDirectory(path),
          "should not move a directory to trash " + path);
      String targetFileLocation =
          generateFileLocationInTrash(
              getRelativeFileLocation(this.tableRootLocation, path),
              this.trashLocation,
              System.currentTimeMillis());
      String targetFileDir = TableFileUtil.getFileDir(targetFileLocation);
      if (!fileIO.exists(targetFileDir)) {
        fileIO.makeDirectories(targetFileDir);
      }
      if (fileIO.exists(targetFileLocation)) {
        fileIO.deleteFile(targetFileLocation);
      }
      fileIO.rename(path, targetFileLocation);
    } catch (Exception e) {
      LOG.error("{} failed to move file to trash, {}", tableIdentifier, path, e);
      throw e;
    }
  }
Generate file location in trash

@param relativeFileLocation - relative location of file
@param trashLocation - trash location
@param deleteTime - time the file deleted
@return file location in trash
amoro-format-iceberg/src/main/java/org/apache/amoro/io/BasicTableTrashManager.java