Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.Write

TElSimpleSFTPClient     See also     


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


Writes sequence of bytes to the remote file

Declaration

[C#]
    void Write(byte[] Handle, long Offset, byte[] Buffer);
    void Write(byte[] Handle, long Offset, byte[] Buffer, int StartIndex, int Count);

[VB.NET]
    Sub Write(ByVal Handle As Byte(), ByVal Offset As Long, ByVal Buffer As Byte())
    Sub Write(ByVal Handle As Byte(), ByVal Offset As Long, ByVal Buffer As Byte(), ByVal StartIndex As Integer, ByVal Count As Integer)

[Pascal]
    procedure Write(const Handle : TSBSftpFileHandle; Offset : Int64; Buffer : Pointer; Size : integer);

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

[PHP]
    void Write(array of byte|string|NULL $Handle, integer $Offset, TSBPointer|array of byte|string|NULL $Buffer, integer $Size)

[Java]
    void write(byte[] Handle, long Offset, byte[] Buffer, int StartIndex, int Count);
    void write(byte[] Handle, long Offset, byte[] Buffer);

Parameters

  • Handle - handle to the opened file, returned by OnOpenFileevent
  • Offset - position from which the data should be written
  • Buffer - the data that should be written to file
  • Size - size of the Buffer
  • StartIndex - position in the buffer from which data must be written
  • Count - amount of bytes to be written

Description

    Use this method to write the data to the opened file. Do not pass the handle to opened directory as Handle.
    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.

See also:     Read    

Discuss this help topic in SecureBlackbox Forum