Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.DownloadStream

TElSimpleSFTPClient     See also     


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


Downloads the remote file to the stream.

Declaration

[C#/Java]
    void DownloadStream(string RemoteFileName, System.IO.Stream LocalStream, TSBFileTransferMode Mode);
    void DownloadStream(string RemoteFileName, System.IO.Stream LocalStream, TSBFileTransferMode Mode, long RestartFrom);
    void DownloadStream(string RemoteFileName, System.IO.Stream LocalStream, bool SuppressAdditionalOperations);

[VB.NET]
    Sub DownloadStream(ByVal RemoteFileName As String, ByVal LocalStream As System.IO.Stream, ByVal Mode As TSBFileTransferMode)
    Sub DownloadStream(ByVal RemoteFileName As String, ByVal LocalStream As System.IO.Stream, ByVal Mode As TSBFileTransferMode, ByVal RestartFrom As Long)
    Sub DownloadStream(ByVal RemoteFileName As String, ByVal LocalStream As System.IO.Stream, ByVal SuppressAdditionalOperations As Boolean)

[Pascal]
    procedure DownloadStream(const RemoteFileName: string; LocalStream: TStream; Mode: TSBFileTransferMode);
    procedure DownloadStream(const RemoteFileName: string; LocalStream: TStream; Mode: TSBFileTransferMode; RestartFrom: Int64);
    procedure DownloadStream(const RemoteFileName: string; LocalStream: TStream; SuppressAdditionalOperations: boolean);

[C++]
    void DownloadStream(const std::string &RemoteFileName, TStream &LocalStream, TSBFileTransferMode Mode);
    void DownloadStream(const std::string &RemoteFileName, TStream *LocalStream, TSBFileTransferMode Mode);
    void DownloadStream(const std::string &RemoteFileName, TStream &LocalStream, TSBFileTransferMode Mode, int64_t RestartFrom);
    void DownloadStream(const std::string &RemoteFileName, TStream *LocalStream, TSBFileTransferMode Mode, int64_t RestartFrom);
    void DownloadStream(const std::string &RemoteFileName, TStream &LocalStream, bool SuppressAdditionalOperations);
    void DownloadStream(const std::string &RemoteFileName, TStream *LocalStream, bool SuppressAdditionalOperations);

[PHP]
    void DownloadStream(string $RemoteFileName, TStream $LocalStream, integer $Mode)
    void DownloadStream(string $RemoteFileName, TStream $LocalStream, integer $Mode, integer $RestartFrom)
    void DownloadStream(string $RemoteFileName, TStream $LocalStream, bool $SuppressAdditionalOperations)

Parameters

  • RemoteFileName - remote path to the downloaded file
  • LocalStream - local stream to store the file to
  • Mode - specifies what to do if the file with the same name already exists
  • RestartFrom - can be used to resume broken transfer operation.When RestartFrom is set to non-zero positive value, the file being transferred is read starting from RestartFrom position and is written also starting from RestartFrom position.
  • SuppressAdditionalOperations - ...

Values


Description

    Use this method when you want to download remote file to local stream. The method uses PipelineLength and DownloadBlockSize to calculate the size of the chunks, which are requested from the server. To select ASCII or binary transfer mode use ASCIIMode property.
    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.

See also:     UploadStream     DownloadFile     ASCIIMode     PipelineLength     DownloadBlockSize    

Discuss this help topic in SecureBlackbox Forum