DownloadFile
Facilitates downloading specific files from a GitHub repository for offline access or local reference.
Sample
The 'Path' parameter is required, and must be relative to the repository root without a preceding '/'.
EXECUTE [Information].[DownloadFile] LocalPath='/tmp/file.txt', Repository='myRepository', Branch='main', Path='ReadMe.md'
Provide a value for OwnerLogin to download files form repositories of other owners.
EXECUTE [Information].[DownloadFile] LocalPath='C:/Users/CData/Desktop/file.txt', OwnerLogin='cdata' Repository='publicRepository', Branch='main', Path='src/Main.java'
Input
Name | Type | Description |
Path | String | The relative path of the file within the repository, starting from the repository root. |
Repository | String | The name of the repository from which the file is downloaded. |
OwnerLogin | String | The username or organization name that owns the repository containing the file. |
Branch | String | The branch of the repository to download the file from. Defaults to 'main' if not specified.
The default value is main. |
LocalPath | String | The absolute file path on the local system where the downloaded file is saved. This is optional if using OutputStream. |
Result Set Columns
Name | Type | Description |
Success | Boolean | Indicates whether the file download operation completed successfully. Returns a Boolean value. |
Details | String | Provides additional information about the operation's execution, including error messages if the operation failed. |
FileData | String | Outputs the file's content as a BASE64-encoded string if both LocalPath and OutputStream are not specified. |