Discuss this help topic in SecureBlackbox Forum


TElSimpleSFTPClient     See also     

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

Reads the part of a remote file.


    int Read(byte[] Handle, long Offset, ref byte[] Buffer, int Length);
    int Read(byte[] Handle, long Offset, byte[] Buffer, int StartIndex, int Count);

    Function Read(ByVal Handle As Byte(), ByVal Offset As Long, ByRef Buffer As Byte(), ByVal Length As Integer) As Integer
    Function Read(ByVal Handle As Byte(), ByVal Offset As Long, ByVal Buffer As Byte(), ByVal StartIndex As Integer, ByVal Count As Integer) As Integer

    function Read(const Handle: TSBSftpFileHandle; Offset: Int64; Buffer : Pointer; Length: integer) : integer;
    type TSBSftpFileHandle = ByteArray;

    int32_t Read(const std::vector<uint8_t> &Handle, int64_t Offset, void * Buffer, int32_t Length);

    integer Read(array of byte|string|NULL $Handle, integer $Offset, TSBPointer|array of byte|string|NULL $Buffer, integer $Length)


  • Handle - handle to opened file, returned by OnOpenFileevent
  • Offset - position from which the file is read
  • Length - the number of bytes to read
  • Buffer - buffer that contains read data
  • StartIndex - position in the buffer from which data must be read
  • Count - amount of bytes to be read


    Use this method to read the data block from the opened file.
    In case of error, EElSFTPError exception containing SFTP error code, is raised. For more information on error handling, please read the corresponding how-to article.
    Do not pass the handle to opened directory as Handle.

See also:     Write     ReadDirectory    

Discuss this help topic in SecureBlackbox Forum