2024-06-04 20:55:01 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 7
|
|
|
|
---
|
|
|
|
|
|
|
|
# Download file
|
|
|
|
Downloads a file at the specified path
|
|
|
|
|
|
|
|
|
|
|
|
*Function DownloadFile(Val Token, Val Path, Val SavePath = "") Export*
|
|
|
|
|
|
|
|
| Parameter | CLI option | Type | Destination |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Token |
|
|
|
|
| Path | --path | String | Path to the file for downloading |
|
|
|
|
| SavePath | --out | String | File save path |
|
|
|
|
|
|
|
|
|
|
|
|
Returns: BinaryData,String - Binary data or file path when SavePath parameter is specified
|
|
|
|
|
|
|
|
```bsl title="Code example"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```sh title="CLI command example"
|
|
|
|
|
|
|
|
oint yadisk DownloadFile --token %token% --path %path% --out %out%
|
|
|
|
|
2024-06-05 11:58:00 +02:00
|
|
|
|
2024-06-04 20:55:01 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```json title="Result"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|