View Source SFTPClient.Operations.DownloadFile (SFTP Client v2.0.1)

A module that provides functions to download files from an SFTP server.

Summary

Functions

Downloads a file from the remote path and stores it in the given local path. When the local path is a directory, the file name of the local file is inferred from the remote path.

Downloads a file from the remote path and stores it in the given local path. When the local path is a directory, the file name of the local file is inferred from the remote path. Raises when the operation fails.

Functions

Link to this function

download_file(conn, remote_path, local_path)

View Source
@spec download_file(SFTPClient.Conn.t(), Path.t(), Path.t()) ::
  {:ok, Path.t()} | {:error, SFTPClient.error()}

Downloads a file from the remote path and stores it in the given local path. When the local path is a directory, the file name of the local file is inferred from the remote path.

Link to this function

download_file!(conn, remote_path, local_path)

View Source
@spec download_file!(SFTPClient.Conn.t(), Path.t(), Path.t()) ::
  Path.t() | no_return()

Downloads a file from the remote path and stores it in the given local path. When the local path is a directory, the file name of the local file is inferred from the remote path. Raises when the operation fails.