Discuss this help topic in SecureBlackbox Forum


TElSimpleSFTPClient     See also     

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

Opens a stream access to the remote file.


    TElSftpStream OpenStream(string Filename, TSBSftpFileOpenModes Modes);

    Function OpenStream(ByVal Filename As String, ByVal Modes As TSBSftpFileOpenModes) As TElSftpStream

    function OpenStream(const Filename : string; Modes : TSBSftpFileOpenModes) : TElSftpStream;
    TSBSftpFileOpenModes set of TSBSftpFileOpenMode;

    TElSftpStreamHandle OpenStream(const std::string &Filename, TSBSftpFileOpenModes Modes);

    TElSftpStream OpenStream(string $Filename, integer $Modes)

    TElSftpStream openStream(String Filename, TSBSftpFileOpenModes Modes);


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

TSBSftpFileOpenMode values

TSBSftpFileOpenModes values

Return value



    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