Discuss this help topic in SecureBlackbox Forum

TElSftpClient.Write

TElSftpClient     See also     


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


Writes sequence of bytes to the remote file

Declaration

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

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

[Pascal]
    function Write(Handle : TSBSftpFileHandle; Offset : Int64; Buffer : pointer; Size : cardinal): Boolean;
    procedure WriteSync(Handle: TSBSftpFileHandle; Offse: Int64; Buffer: pointer; Size: cardinal);
    type TSBSftpFileHandle = ByteArray;

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

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

Parameters

  • Handle - handle to opened file, returned by OnOpenFile event
  • Offset - position from which the data should be written
  • Buffer - the data that should be written to file
  • Size - the number of bytes in Buffer
  • StartIndex - position in the Buffer to start reading from
  • Count - the number of bytes to read from the Buffer

Return value

    True if operation was completed successfully;
    False otherwise.

Description

    Use this method to write data to opened files. Do not pass as Handle the handle to opened directory. If the data was successfully written to file, the OnSuccess event is fired. The OnError event is fired otherwise.

See also:     Read    

Discuss this help topic in SecureBlackbox Forum