Crate openssh_sftp_client_lowlevel

Source
Expand description

This crate provides a set of APIs to access the remote filesystem using the sftp protocol and is implemented in pure Rust.

It supports sending multiple requests concurrently using WriteEnd (it can be WriteEnd::cloned), however receiving responses have to be done sequentially using ReadEnd::read_in_one_packet.

To create WriteEnd and ReadEnd, simply pass the stdin and stdout of the sftp-server launched at remote to connect.

This crate supports all operations supported by sftp v3, in additional to the following extensions:

Modules§

changelog
Changelog for this crate.

Structs§

AwaitableAttrs
Awaitable
AwaitableAttrsFuture
Return (id, res).
AwaitableData
Awaitable
AwaitableDataFuture
Return (id, res).
AwaitableHandle
Awaitable
AwaitableHandleFuture
Return (id, res).
AwaitableLimits
Awaitable
AwaitableLimitsFuture
Return (id, res).
AwaitableName
Awaitable
AwaitableNameEntries
Awaitable
AwaitableNameEntriesFuture
Return (id, res).
AwaitableNameFuture
Return (id, res).
AwaitableStatus
Awaitable
AwaitableStatusFuture
Return (id, res).
Extensions
The extension that the sftp-server supports.
FileAttrs
Handle
HandleOwned
Id
Request Id
Limits
Payload of extended reply response when crate::request::RequestInner::Limits is sent.
NameEntry
Entry in ResponseInner::Name
OpenFileRequest
OpenOptions
Permissions
ReadEnd
The ReadEnd for the lowlevel API.
SftpErrMsg
SharedData
SharedData contains both the writer and the responses because:
UnixTimeStamp
Default value is 1970-01-01 00:00:00 UTC.
WriteEnd
It is recommended to create at most one WriteEnd per thread using WriteEnd::clone.

Enums§

Buffer
Buffer that can be used to write data into.
CreateFlags
Data
The data returned by WriteEnd::send_read_request.
Error
Error returned by openssh-sftp-client-lowlevel and openssh-sftp-client
FileType
SftpErrorKind
UnixTimeStampError

Constants§

OPENSSH_PORTABLE_DEFAULT_COPY_BUFLEN
Default size of buffer for up/download in openssh-portable
OPENSSH_PORTABLE_DEFAULT_DOWNLOAD_BUFLEN
Default length of download buffer in openssh-portable
OPENSSH_PORTABLE_DEFAULT_NUM_REQUESTS
Default number of concurrent outstanding requests in openssh-portable
OPENSSH_PORTABLE_DEFAULT_UPLOAD_BUFLEN
Default length of upload buffer in openssh-portable
OPENSSH_PORTABLE_MAX_DIR_DEPTH
Maximum depth to descend in directory trees in openssh-portable
OPENSSH_PORTABLE_MIN_READ_SIZE
Minimum amount of data to read at a time in openssh-portable

Traits§

Queue
ToBuffer
Any type that can act as a buffer.

Functions§

connect
Initialize connection to remote sftp server and negotiate the sftp version.