Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.OpenStream

TElSimpleSFTPClient     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);

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

Parameters

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

TSBSftpFileOpenMode values


TSBSftpFileOpenModes values

Return value

    …

Description

    Use this method to open remote access to a file using stream interface.
    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.
    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