code: public RepositoryFile getFile(Object projectIdOrPath, String filePath, String ref, boolean includeContent) throws GitLabApiException {
  
          if (!includeContent) {
              return (getFileInfo(projectIdOrPath, filePath, ref));
          }
  
          Form form = new Form();
          addFormParam(form, "ref", ref, true);
          Response response = get(Response.Status.OK, form.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "repository", "files", urlEncode(filePath));
          return (response.readEntity(RepositoryFile.class));
      }
docs: Get file from repository. Allows you to receive information about file in repository like name, size, and optionally content.
  Note that file content is Base64 encoded.
  
  <pre><code>GitLab Endpoint: GET /projects/:id/repository/files</code></pre>
  
  @param projectIdOrPath the id, path of the project, or a Project instance holding the project ID or path
  @param filePath (required) - Full path to the file. Ex. lib/class.rb
  @param ref (required) - The name of branch, tag or commit
  @param includeContent if true will also fetch file content
  @return a RepositoryFile instance with the file info and optionally file content
  @throws GitLabApiException if any exception occurs