GetSupportedChecksumAlgorithms missing from FileTransferClient

0 votes
asked Feb 3 by sharmamayank_vmware (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
answered Feb 3 by Lukas Pokorny (116,630 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)

commented Feb 3 by sharmamayank_vmware (220 points)
How can we check whether SFTP server supports check-file extension?
commented Feb 5 by Lukas Pokorny (116,630 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).
...