2024-06-05 12:19:46 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 7
|
|
|
|
---
|
|
|
|
|
|
|
|
# Download file
|
|
|
|
Downloads a file at the specified path
|
|
|
|
|
|
|
|
|
2024-07-10 10:59:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
*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
|
|
|
|
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
```bsl title="Code example"
|
2024-06-09 00:01:18 +02:00
|
|
|
Path = "/alpaca.png";
|
|
|
|
Result = OPI_YandexDisk.DownloadFile(Token, Path);
|
2024-06-05 12:19:46 +02:00
|
|
|
```
|
2024-07-10 10:59:55 +02:00
|
|
|
|
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
|
|
|
|
|
|
|
oint yadisk DownloadFile --token %token% --path %path% --out %out%
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-06-09 01:02:40 +02:00
|
|
|
<Binary file's binary data>
|
2024-06-05 12:19:46 +02:00
|
|
|
```
|