code: public boolean moveToTrashAsOwner(Path path) throws IOException {
      String owner = this.fs.getFileStatus(path).getOwner();
      return moveToTrashAsUser(path, owner);
    }
docs: Move the path to trash as the owner of the path.
  @param path {@link org.apache.hadoop.fs.Path} to move.
  @return true if the move succeeded.
  @throws IOException