DownloadFile
Enables downloading specific files from a repository, facilitating local inspection or offline use.
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 | Description |
| Path | String | The relative file path from the root of the repository. |
| Branch | String | The name of the branch from which to download the file. Defaults to 'main' if not specified.
The default value is main. |
| LocalPath | String | The absolute local path where the file is saved once downloaded. |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | Indicates whether the operation completed successfully (true or false). |
| Details | String | Additional information or status about the execution of the operation. |
| FileData | String | The content of the file in BASE64 format, output only if both LocalPath and OutputStream are not specified. |