Sftp.GetChecksum Method
Namespace: Rebex.Net
Assembly: Rebex.Sftp.dll (version 7.0.9119)
GetChecksum(String, ChecksumAlgorithm)
Returns the checksum of the specified file on the server. Only works on servers that support the
check-file
extension.
Declaration
public Checksum GetChecksum(string remotePath, ChecksumAlgorithm algorithm)
Parameters
Type | Name | Description |
---|---|---|
String | remotePath | Path of the remote file. |
ChecksumAlgorithm | algorithm | Desired checksum algorithm (server must support it). |
Returns
Type | Description |
---|---|
Checksum | Checksum of the specified remote file. |
Implements
Remarks
Please note that not all SFTP servers support checksum calculation, and not all SFTP servers support all checksum algorithms.
To calculate checksums of local files, use one of GetChecksum(String, ChecksumAlgorithm) methods.
GetChecksum(String, ChecksumAlgorithm, Int64, Int64)
Returns the checksum of the specified file on the server. Only works on servers that support the
check-file
extension.
Declaration
public Checksum GetChecksum(string remotePath, ChecksumAlgorithm algorithm, long offset, long count)
Parameters
Type | Name | Description |
---|---|---|
String | remotePath | Path of the remote file. |
ChecksumAlgorithm | algorithm | Desired checksum algorithm (server must support it). |
Int64 | offset | The offset in remote file where reading will start. |
Int64 | count | The maximum number of bytes to read. |
Returns
Type | Description |
---|---|
Checksum | Checksum of the specified remote file. |
Implements
Remarks
Please note that not all SFTP servers support checksum calculation, and not all SFTP servers support all checksum algorithms.
To calculate checksums of local files, use one of GetChecksum(String, ChecksumAlgorithm, Int64, Int64) methods.