private Optional<String> findFileFromTrash(String path) {
    if (!fileIO.exists(this.trashLocation)) {
      return Optional.empty();
    }
    String targetRelationLocationInTable = getRelativeFileLocation(this.tableRootLocation, path);

    Iterable<PathInfo> paths = fileIO.listDirectory(this.trashLocation);

    List<String> targetLocationsInTrash = Lists.newArrayList();
    for (PathInfo p : paths) {
      String fullLocation = p.location() + "/" + targetRelationLocationInTable;
      if (fileIO.exists(fullLocation)) {
        if (!fileIO.isDirectory(fullLocation)) {
          targetLocationsInTrash.add(fullLocation);
        }
      }
    }

    return targetLocationsInTrash.stream().max(Comparator.naturalOrder());
  }
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