code: @Override
    public boolean moveToTrash(Path path) throws IOException {
      Path fullyResolvedPath = path.isAbsolute() ? path : new Path(this.fs.getWorkingDirectory(), path);
      Path targetPathInTrash = PathUtils.mergePaths(this.trashLocation, fullyResolvedPath);
  
      if (!this.fs.exists(targetPathInTrash.getParent())) {
        this.fs.mkdirs(targetPathInTrash.getParent());
      } else if (this.fs.exists(targetPathInTrash)) {
        targetPathInTrash = targetPathInTrash.suffix("_" + System.currentTimeMillis());
      }
  
      return this.fs.rename(fullyResolvedPath, targetPathInTrash);
    }
docs: Move a path to trash. The absolute path of the input path will be replicated under the trash directory.
  @param path {@link org.apache.hadoop.fs.FileSystem} path to move to trash.
  @return true if move to trash was done successfully.
  @throws IOException