DownloadContents returns an io.ReadCloser that reads the contents of the specified file. This function will work with files of any size, as opposed to GetContents which is limited to 1 Mb files. It is the caller's responsibility to close the ReadCloser. It is possible for the download to result in
(ctx context.Context, owner, repo, filepath string, opts *RepositoryContentGetOptions)
| 147 | // |
| 148 | //meta:operation GET /repos/{owner}/{repo}/contents/{path} |
| 149 | func (s *RepositoriesService) DownloadContents(ctx context.Context, owner, repo, filepath string, opts *RepositoryContentGetOptions) (io.ReadCloser, *Response, error) { |
| 150 | rc, _, resp, err := s.DownloadContentsWithMeta(ctx, owner, repo, filepath, opts) |
| 151 | return rc, resp, err |
| 152 | } |
| 153 | |
| 154 | // DownloadContentsWithMeta is identical to DownloadContents but additionally |
| 155 | // returns the RepositoryContent of the requested file. This additional data |