Skip to main content

Download file

Downloads a file at the specified path

Function DownloadFile(Val Token, Val Path, Val SavePath = "") Export

ParameterCLI optionTypeDescription
Token--tokenStringToken
Path--pathStringPath to the file for downloading
SavePath--outStringFile save path

Returns: BinaryData,String - Binary data or file path when SavePath parameter is specified


Code example
    Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
Path = "/ced52016-2220-4e04-aa8b-a6fc063d165e.png";

Result = OPI_YandexDisk.DownloadFile(Token, Path);
CLI command example
    
oint yadisk DownloadFile --token %token% --path "/alpaca.png" --out %out%

Result
<Binary file's binary data>