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 [Repository_MyRepository].[DownloadFile] LocalPath='/tmp/file.txt', Branch='main', Path='ReadMe.md'
Alternatively, set the connection property Schema to the desired repository.
EXECUTE [DownloadFile] LocalPath='C:/Users/CData/Desktop/file.txt', Branch='main', Path='src/Main.java'
Input
Name | Type | Accepts Output Streams | Description |
Path | String | False | The file path, relative to the repository root. |
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. |