code: public RepositoryFile getFileInfo(Object projectIdOrPath, String filePath, String ref) throws GitLabApiException {
  
          Form form = new Form();
          addFormParam(form, "ref", ref, true);
          Response response = head(Response.Status.OK, form.asMap(),
                  "projects", getProjectIdOrPath(projectIdOrPath), "repository", "files", urlEncode(filePath));
  
          RepositoryFile file = new RepositoryFile();
          file.setBlobId(response.getHeaderString("X-Gitlab-Blob-Id"));
          file.setCommitId(response.getHeaderString("X-Gitlab-Commit-Id"));
          file.setEncoding(response.getHeaderString("X-Gitlab-Encoding"));
          file.setFileName(response.getHeaderString("X-Gitlab-File-Name"));
          file.setFilePath(response.getHeaderString("X-Gitlab-File-Path"));
          file.setLastCommitId(response.getHeaderString("X-Gitlab-Last-Commit-Id"));
          file.setRef(response.getHeaderString("X-Gitlab-Ref"));
  
          String sizeStr = response.getHeaderString("X-Gitlab-Size");
          file.setSize(sizeStr != null ? Integer.valueOf(sizeStr) : -1);
  
          return (file);
      }
docs: Get information on a file in the repository. Allows you to receive information about file in repository like name, size.
  Only works with GitLab 11.1.0+, returns an empty object for earlier versions of GitLab.
  
  <pre><code>GitLab Endpoint: HEAD /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
  @return a RepositoryFile instance with the file info
  @throws GitLabApiException if any exception occurs
  @since GitLab-11.1.0