FTPS: Download files (low-level method)
The simpliest variant of Receive() method accepts only the remote file name as a parameter. One more variant of Receive() method receives the remote file name and starting and ending position in the remote file to retrieve as parameters. With these two variants the downloaded data is passed to the application using OnBinaryData event of TElSimpleFTPSClient class.
Other two variants of Receive() method besides the mentioned parameters accept the destination stream to store the remote data.
The progress of the download operation is reported using OnProgress event of TElSimpleFTPSClient class. The progress reported includes the currently downloaded amount of data and the total size of the file. Note, that total size is only reported when UseSIZECmd property of TElSimpleFTPSClient class is set to true, and when the server supports this command. Otherwise, Total parameter of OnProgress event will be 0.
To stop the operation without closing connection you can set Cancel parameter of the OnProgress event handler to true. This will stop the download and close the data channel.