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::clone
d), 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§
- Awaitable
Attrs - Awaitable
- Awaitable
Attrs Future - Return (id, res).
- Awaitable
Data - Awaitable
- Awaitable
Data Future - Return (id, res).
- Awaitable
Handle - Awaitable
- Awaitable
Handle Future - Return (id, res).
- Awaitable
Limits - Awaitable
- Awaitable
Limits Future - Return (id, res).
- Awaitable
Name - Awaitable
- Awaitable
Name Entries - Awaitable
- Awaitable
Name Entries Future - Return (id, res).
- Awaitable
Name Future - Return (id, res).
- Awaitable
Status - Awaitable
- Awaitable
Status Future - Return (id, res).
- Extensions
- The extension that the sftp-server supports.
- File
Attrs - Handle
- Handle
Owned - Id
- Request Id
- Limits
- Payload of extended reply response when
crate::request::RequestInner::Limits
is sent. - Name
Entry - Entry in
ResponseInner::Name
- Open
File Request - Open
Options - Permissions
- ReadEnd
- The ReadEnd for the lowlevel API.
- Sftp
ErrMsg - Shared
Data - SharedData contains both the writer and the responses because:
- Unix
Time Stamp - Default value is 1970-01-01 00:00:00 UTC.
- Write
End - It is recommended to create at most one
WriteEnd
per thread usingWriteEnd::clone
.
Enums§
- Buffer
- Buffer that can be used to write data into.
- Create
Flags - Data
- The data returned by
WriteEnd::send_read_request
. - Error
- Error returned by
openssh-sftp-client-lowlevel
andopenssh-sftp-client
- File
Type - Sftp
Error Kind - Unix
Time Stamp Error
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§
Functions§
- connect
- Initialize connection to remote sftp server and negotiate the sftp version.