Crate openssh_sftp_client

Source
Expand description

openssh sftp client, implements sftp v3 accodring to openssh-portable/sftp-client.c and provides an easy-to-use highlevel API.

All async functions in this module are cancel safe.

Internally, this is archived by first writing requests into a write buffer containing bytes::Bytes and then flush all buffers at once periodically to archive cancel safety and improve efficiencies.

However, cancelling the future does not actually has any effect, since the requests are sent regardless of the cancellation.

Thus, if you cancel a future that changes the remote filesystem in any way, then the change would still happen regardless.

§Usage

It is recommended that you use this crate with openssh.

You can also use this crate directly by using whatever ssh library to launch the sftp subsystem, then pass the stdin/stdout to Sftp::new.

§Extensions

This crate support the following extensions:

  • limits
  • expand path
  • fsync
  • hardlink
  • posix rename
  • copy data

Re-exports§

pub use openssh_sftp_error as error;
pub use openssh;openssh

Modules§

changelog
Changelog for this crate.
file
Module contains types for manipulating files.
fs
Module contains types for manipulating directories.
metadata
Module contains types for manipulating metadata of files or directories.

Structs§

OpensshSessionopenssh
The openssh session
Sftp
A file-oriented channel to a remote host.
SftpOptions
Options when creating super::Sftp.
UnixTimeStamp
Default value is 1970-01-01 00:00:00 UTC.

Enums§

Error
Error returned by openssh-sftp-client-lowlevel and openssh-sftp-client
SftpAuxiliaryData
Auxiliary data for Sftp.
UnixTimeStampError

Traits§

CheckOpensshConnectionopenssh
Check for openssh connection to be alive