procedure DefaultBlockFile(SFTPSessionInfo: TScSFTPSessionInfo; Data: TObject; const Offset, Len: Int64; const BlockModes: TScSFTPBlockModes; var Error: TScSFTPError); virtual;



Call the DefaultBlockFile method to create a byte-range lock on a file specified by the Data object. The lock can be either mandatory (the server enforces that no other process or client can perform operations violating the lock) or advisory (no other processes can obtain a conflicting lock, but the server does not enforce that no operation violates the lock).



SFTPSessionInfo - contains the information about the current SFTP session.
Data - specifies the information about a blocking file as the TScHandle object. Usually this object is previously returned by the DefaultOpenFile method.
Offset - zero-based byte offset in the file that indicates the beginning of the byte-range to lock.
Len - the number of bytes in the range to lock. The special value 0 means a lock from Offset to the end of the file.
BlockModes - the blocking mode.
Error - returns the information about an error that can arise when blocking a file.


See also


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