DownloadFile
Download a file from a given repository.
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 | Accepts Output Streams | Description |
Path | String | False | The file path, relative to the repository root. |
Repository | String | False | The repository to download the file from. |
OwnerLogin | String | False | The owner of the repository. |
Branch | String | False | The branch to download the file from. Defaults to 'main'.
The default value is main. |
LocalPath | String | False | The absolute path where the file will be saved. |
OutputStream | Binary | True | An instance of an output stream where file data is written to. Only used if LocalPath is not set. |
Result Set Columns
Name | Type | Description |
Success | Boolean | Indicates whether or not the operation executed successfully. |
Details | String | Any extra details on the operation's execution. |
FileData | String | If the LocalPath and FileStream inputs are empty, file data will be output as BASE64. |