Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.Read

TElSimpleSFTPClient     See also     


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


Reads the part of a remote file.

Declaration

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

[VB.NET]
    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

[Pascal]
    function Read(const Handle : TSBSftpFileHandle; Offset : Int64; Buffer : Pointer; Length : integer) : integer;

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

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

[Java]
    int read(byte[] Handle, long Offset, byte[][] Buffer, int Length);
    int read(byte[] Handle, long Offset, byte[] Buffer, int StartIndex, int Count);

Parameters

  • 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

Return value

    Returns

Description

    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