Skip to content

Commit

Permalink
docs: add docstring for upload_file method
Browse files Browse the repository at this point in the history
  • Loading branch information
Miyoshi-Ryota committed May 5, 2024
1 parent 6c3ffa9 commit d7d8cc2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,13 @@ impl Client {
.map_err(crate::Error::SshError)
}

/// Upload a file with sftp to the remote server.
///
/// `src_file_path` is the path to the file on the local machine.
/// `dest_file_path` is the path to the file on the remote machine.
/// Some sshd_config does not enable sftp by default, so make sure it is enabled.
/// A config line like a `Subsystem sftp internal-sftp` or
/// `Subsystem sftp /usr/lib/openssh/sftp-server` is needed in the sshd_config in remote machine.
pub async fn upload_file(
&self,
src_file_path: &str,
Expand Down

0 comments on commit d7d8cc2

Please sign in to comment.