Discuss this help topic in SecureBlackbox Forum

TElSftpClient.OpenStream

TElSftpClient     See also     


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


Opens a stream access to the remote file.

Declaration

[C#]
    TElSftpStream OpenStream(string Filename, TSBSftpFileOpenModes Modes);

[VB.NET]
    Function OpenStream(ByVal Filename As String, ByVal Modes As TSBSftpFileOpenModes) As TElSftpStream

[Pascal]
    function OpenStream(const Filename : string; Modes : TSBSftpFileOpenModes) : TElSftpStream;
    
    TSBSftpFileOpenModes = set of TSBSftpFileOpenMode;

[C++]
    TElSftpStreamHandle OpenStream(const std::string &Filename, TSBSftpFileOpenModes Modes);

[PHP]
    TElSftpStream OpenStream(string $Filename, integer $Modes)

[Java]
    TElSftpStream openStream(String Filename, TSBSftpFileOpenModes Modes);

Parameters

  • Filename - the name of the file to be opened.
  • Modes - specifies the file opening modes.

TSBSftpFileOpenMode values:

TSBSftpFileOpenModes values

TSBSftpFileOpenModes values

TSBSftpFileOpenModes values

TSBSftpFileOpenModes values

TSBSftpFileOpenModes values

TSBSftpFileOpenModes values

TSBSftpFileOpenModes values

TSBSftpFileOpenModes values

Return value

    Returns a reference to the newly created SFTP stream object.

Description

    Use this method to open remote access to a file using stream interface. Note, that call to this method sets SFTPClient into synchronous for the time of all TElSftpStream methods execution.
   Note, setting of file opening mode differs for VCL and .NET versions. To enable several modes in .NET use bitwise OR operation, for example ‘fmRead | fmWrite | fmAppend’.

See also:     OpenFile    

Discuss this help topic in SecureBlackbox Forum