No, there is no caching, as there is no such thing in the FTP protocol in general. TIdFTP
deals only with live data.
Are you, perhaps, uploading binary files in ASCII mode? If so, that would alter line break characters (CR and LF) during transmission. That is a common mistake to make, since ASCII is FTP's default mode. Make sure you are setting the TIdFTP.TransferType
property as needed before transferring a file. ASCII mode should only be used for text files, if used at all.
And FWIW, you may not need to download a file to verify its bytes. If the server supports any X<Hash>
commands (where Hash
can be SHA512
, SHA256
, SHA1
, MD5
, or CRC
) , TIdFTP
has VerifyFile()
methods to use them. That calculates a hash of a local file and then compares it to a hash calculated by the server for a remote file. No transfer of file data is needed.