procedure CheckFile(const FileName: string; StartOffset, Length: Int64; BlockSize: Integer; ReplyExtension: TScCheckFileReplyExtension = nil);



Call the CheckFile method to check if a file (or its part) that client already has matches the one that is on the server.

If the NonBlocking property is False, CheckFile returns control after receiving an answer from the server and writing the results to the ReplyExtension object. Otherwise the result is written to the ReplyExtension object on executing the OnReplyCheckFile event. If the server returns an error, the OnError event is generated.


Note: this request is not supported by all SFTP servers.



FileName - the path to the file to check. If FileName is a directory, an error will be returned. If FileName refers to a symbolic link, the target will be opened.
StartOffset - the starting offset of the data to include to the hash.
Length - the length of data to include to the hash. If the length is zero, all data from StartOffset to the end-of-file should be included.
BlockSize - an independent hash that will be computed over every block in the file. The size of blocks is specified by BlockSize. The BlockSize must not be smaller than 256 bytes. If the block-size is 0, then only one hash over the entire range will be made.
ReplyExtension - an object to which the computed hashes will be written. If this parameter is set to nil or is not set at all, then the OnReplyCheckFile event should be processed. If the object is specified, it will be returned in the OnReplyCheckFile event handler.


See also





SecureBridge Components, Copyright © 2007-2021 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support