FluentFTP icon indicating copy to clipboard operation
FluentFTP copied to clipboard

DownloadAsync with optional parameters

Open YipingRuan opened this issue 2 years ago • 1 comments

FluentFTP Version: 37.0.2.0

What should be the correct way to use DownloadAsync

https://github.com/robinrodricks/FluentFTP/blob/80e350bccd8adf0cad905fe9407d2c27a1841e97/FluentFTP/Client/FtpClient_FileDownload.cs#L624 https://github.com/robinrodricks/FluentFTP/blob/80e350bccd8adf0cad905fe9407d2c27a1841e97/FluentFTP/Client/FtpClient_FileDownload.cs#L649

Both methods has 1 string parameter and the rest are optional, so it is ambiguous, any chance I can simply use the below?

var file = await coon.DownloadAsync("xxxxx");

image

Thank you!

YipingRuan avatar Mar 28 '22 03:03 YipingRuan

For now you can just use DownloadAsync("xxxxx", 0)

robinrodricks avatar May 06 '22 05:05 robinrodricks

I was looking for this issue, since I got a similiar warning for DownloadBytes. https://github.com/robinrodricks/FluentFTP/blob/07c890c4af1bc01102402f01141fa174c12e1afa/FluentFTP/Client/AsyncClient/DownloadBytes.cs#L27C29-L27C42

pri-kise avatar Aug 08 '23 06:08 pri-kise