code: public Pager<TreeItem> getTree(Object projectIdOrPath, String filePath, String refName, Boolean recursive, int itemsPerPage) throws GitLabApiException {
          Form formData = new GitLabApiForm()
                  .withParam("id", getProjectIdOrPath(projectIdOrPath), true)
                  .withParam("path", filePath, false)
                  .withParam(isApiVersion(ApiVersion.V3) ? "ref_name" : "ref", refName, false)
                  .withParam("recursive", recursive, false);
          return (new Pager<TreeItem>(this, TreeItem.class, itemsPerPage, formData.asMap(), "projects",
                  getProjectIdOrPath(projectIdOrPath), "repository", "tree"));
      }
docs: Get a Pager of repository files and directories in a project.
  
  <pre><code>GitLab Endpoint: GET /projects/:id/repository/tree</code></pre>
  
  id (required) - The ID of a project
  path (optional) - The path inside repository. Used to get contend of subdirectories
  ref_name (optional) - The name of a repository branch or tag or if not given the default branch
  recursive (optional) - Boolean value used to get a recursive tree (false by default)
  
  @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
  @param filePath the path inside repository, used to get content of subdirectories
  @param refName the name of a repository branch or tag or if not given the default branch
  @param recursive flag to get a recursive tree or not
  @param itemsPerPage the number of Project instances that will be fetched per page
  @return a tree with the directories and files of a project
  @throws GitLabApiException if any exception occurs