Discuss this help topic in SecureBlackbox Forum

TElSftpClient.OpenStream

TElSftpClient     See also     


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


Opens a stream access to the remote file.

Declaration

[C#/Java]
    TElSftpStream OpenStream(string Filename, TSBSftpFileOpenModes Modes);
    
    TSBSftpFileOpenModes = int;
    TSBSftpFileOpenModes represents a bit mask which containes zero or more bit flags as defined by TSBSftpFileOpenMode

[VB.NET]
    Function OpenStream(ByVal Filename As String, ByVal Modes As TSBSftpFileOpenModes) As TElSftpStream
    
    TSBSftpFileOpenModes As Integer
    TSBSftpFileOpenModes represents a bit mask which containes zero or more bit flags as defined by TSBSftpFileOpenMode

[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)

Parameters

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

TSBSftpFileOpenMode 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