Discuss this help topic in SecureBlackbox Forum

TElSftpClient.Block

TElSftpClient     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Creates a byte-range lock on the file

Declaration

[C#]
    bool Block(byte[] Handle, long Offset, long Length, TSBSftpFileOpenAccess LockMask);

[VB.NET]
    Function Block(ByVal Handle As Byte(), ByVal Offset As Long, ByVal Length As Long, ByVal LockMask As TSBSftpFileOpenAccess) As Boolean

[Pascal]
    function Block(const Handle: TSBSftpFileHandle; Offset, Length : Int64; LockMask : TSBSftpFileOpenAccess) : boolean;
    procedure BlockSync(const Handle: TSBSftpFileHandle; Offset, Length : Int64; LockMask : TSBSftpFileOpenAccess);
    
    TSBSftpFileHandle = ByteArray;
    TSBSftpFileOpenAccess = set of TSBSftpFileOpenAccessItem

[C++]
    bool Block(const std::vector<uint8_t> &Handle, int64_t Offset, int64_t Length, TSBSftpFileOpenAccess LockMask);

[PHP]
    bool Block(array of byte|string|NULL $Handle, integer $Offset, integer $Length, integer $LockMask)

[Java]
    boolean block(byte[] Handle, long Offset, long Length, TSBSftpFileOpenAccess LockMask);

Parameters

  • Handle - handle of the open file
  • Offset - beginning of the byte-range to lock.
  • Length - number of bytes in the range to lock. The special value 0 means lock from Offset to the end of the file.
  • LockMask - flags managing blocking process

LockMask values:

TSBSftpFileOpenAccess values

TSBSftpFileOpenAccess values

TSBSftpFileOpenAccess values

TSBSftpFileOpenAccess values

TSBSftpFileOpenAccess values

TSBSftpFileOpenAccess values

TSBSftpFileOpenAccess values

TSBSftpFileOpenAccess values

Return value

    Returns True if operation was completed successfully, and False otherwise.

Description

    Use this method to create a byte-range lock on the file specified by the handle.

See also:     Unblock    

Discuss this help topic in SecureBlackbox Forum