Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.DownloadFile

TElSimpleSFTPClient     See also     


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


Downloads file.

Declaration

[C#/Java]
    void DownloadFile(string RemoteFileName, string LocalFileName);
    void DownloadFile(string RemoteFileName, string LocalFileName, bool SuppressAdditionalOperations);
    void DownloadFile(string RemoteFileName, string LocalFileName, TSBFileTransferMode Mode);
    void DownloadFile(string RemoteFileName, string LocalFileName, TSBFileTransferMode Mode, long RestartFrom);

[VB.NET]
    Sub DownloadFile(ByVal RemoteFileName As String, ByVal LocalFileName As String)
    Sub DownloadFile(ByVal RemoteFileName As String, ByVal LocalFileName As String, ByVal SuppressAdditionalOperations As Boolean)
    Sub DownloadFile(ByVal RemoteFileName As String, ByVal LocalFileName As String, ByVal Mode As TSBFileTransferMode)
    Sub DownloadFile(ByVal RemoteFileName As String, ByVal LocalFileName As String, ByVal Mode As TSBFileTransferMode, ByVal RestartFrom As Long)

[Pascal]
    procedure DownloadFile(const RemoteFileName, LocalFileName: string);
    procedure DownloadFile(const RemoteFileName, LocalFileName: string; Mode: TSBFileTransferMode);
    procedure DownloadFile(const RemoteFileName, LocalFileName: string; Mode: TSBFileTransferMode; RestartFrom: Int64);
    procedure DownloadFile(const RemoteFileName, LocalFileName: string; SuppressAdditionalOperations: boolean);

[C++]
    void DownloadFile(const std::string &RemoteFileName, const std::string &LocalFileName);
    void DownloadFile(const std::string &RemoteFileName, const std::string &LocalFileName, bool SuppressAdditionalOperations);
    void DownloadFile(const std::string &RemoteFileName, const std::string &LocalFileName, TSBFileTransferMode Mode);
    void DownloadFile(const std::string &RemoteFileName, const std::string &LocalFileName, TSBFileTransferMode Mode, int64_t RestartFrom);

[PHP]
    void DownloadFile(string $RemoteFileName, string $LocalFileName)
    void DownloadFile(string $RemoteFileName, string $LocalFileName, bool $SuppressAdditionalOperations)
    void DownloadFile(string $RemoteFileName, string $LocalFileName, integer $Mode)
    void DownloadFile(string $RemoteFileName, string $LocalFileName, integer $Mode, integer $RestartFrom)

Parameters

  • RemoteFileName - the name of the file to be downloaded
  • LocalFileName - local name for the downloaded file
  • 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 a file. 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:     About file system adapters     DownloadStream     UploadFile     ASCIIMode     DownloadBlockSize     FileSystemAdapter     PipelineLength    

Discuss this help topic in SecureBlackbox Forum