Description Usage Arguments Details Value Examples
This function downloads a file in the specified commit to the path provided.
1 | download_file(from_path, to_path, ref, repo, ...)
|
from_path |
(string) The path to the file to download, within the repository. |
to_path |
(string) The path to download the file to. |
ref |
(string) Either a SHA, branch or tag used to identify the commit. |
repo |
(string) The repository specified in the format: |
... |
Parameters passed to |
Note: The GitHub API imposes a file size limit of 100MB for this request.
For more details see the GitHub API documentation:
download_file()
returns the path where the file is downloaded to.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
# Download the README file from the main branch
download_file(
from_path = "README.md",
to_path = "~/README.md",
ref = "main",
repo = "ChadGoymer/githapi"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.