0 votes
by (220 points)

We are using FileTransferClient class to connect to FTP/SFTP servers.

I could not find the GetSupportedChecksumAlgorithms method from FileTransferClient class but it is present in FTP class.

We need this to selected appropriate algorithm to get checksum.

Applies to: Rebex FTP/SSL, Rebex SFTP

1 Answer

0 votes
by (147k points)

For FTP connections, you can access Ftp class methods via FileTransferClient's Inner property, like this:

var ftp = client.Inner as Ftp;
if (ftp != null)
{
    var checksumAlgorithms = ftp.GetSupportedChecksumAlgorithms();
    ...
}

(where client is an instance of FileTransferClient)

by (220 points)
How can we check whether SFTP server supports check-file extension?
by (147k points)
Unfortunately, the only 100% way is to actually try the check-file operation and see whether it works. This is one of the few inconveniences stemming from the fact that the SFTP protocol has never made it into an RFC. It is also the reason there is no GetSupportedChecksumAlgorithms on Rebex Sftp class (and FileTransferClient class).
...