|
libsshpp v0.1.7
Modern C++17 wrapper for libssh
|
A single open SFTP file handle. See docs/design/06 §6.3. More...
#include <file.hpp>
Public Member Functions | |
| File ()=default | |
| ~File () | |
| File (File &&) noexcept | |
| File & | operator= (File &&) noexcept |
| File (const File &)=delete | |
| operator bool () const noexcept | |
| native_sftp_file | native_handle () const noexcept |
| const RemotePath & | path () const noexcept |
| Result< std::size_t > | try_read (MutableByteView) |
| Result< void > | try_read_exact (MutableByteView) |
| Result< std::size_t > | try_write (ByteView) |
| Result< void > | try_write_all (ByteView) |
| Result< std::uint64_t > | try_tell () const |
| Result< void > | try_seek (std::uint64_t offset) |
| Result< void > | try_rewind () |
| Result< Attributes > | try_stat () const |
| Result< void > | try_truncate (std::uint64_t size) |
| Result< void > | try_close () |
| ReadAhead (File &file, std::size_t chunk=0, std::size_t depth=0) | |
| ~ReadAhead () | |
| ReadAhead (const ReadAhead &)=delete | |
| ReadAhead (ReadAhead &&)=delete | |
| Result< ByteView > | try_next () |
| WriteBehind (File &file, std::size_t chunk=0, std::size_t depth=0) | |
| ~WriteBehind () | |
| WriteBehind (const WriteBehind &)=delete | |
| WriteBehind (WriteBehind &&)=delete | |
| Result< void > | try_write (ByteView data) |
| Result< void > | try_flush () |
Friends | |
| class | Sftp |
A single open SFTP file handle. See docs/design/06 §6.3.
Keeps up to depth writes in flight; mirror of ReadAhead for the write side.
Keeps up to depth reads in flight so throughput isn't capped at one round trip per chunk. Falls back to a synchronous loop when the linked libssh predates sftp_aio_* (SSHPP_HAS_SFTP_AIO == 0). See docs/design/06 §6.3.
|
default |
| SSHPP_INLINE sshpp::sftp::File::~File | ( | ) |
|
noexcept |
|
delete |
| sshpp::sftp::File::~ReadAhead | ( | ) |
| sshpp::sftp::File::~WriteBehind | ( | ) |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
| SSHPP_INLINE Result< std::size_t > sshpp::sftp::File::try_read | ( | MutableByteView | buf | ) |
| SSHPP_INLINE Result< void > sshpp::sftp::File::try_read_exact | ( | MutableByteView | buf | ) |
| SSHPP_INLINE Result< std::uint64_t > sshpp::sftp::File::try_tell | ( | ) | const |
| SSHPP_INLINE Result< void > sshpp::sftp::File::try_seek | ( | std::uint64_t | offset | ) |
| SSHPP_INLINE Result< void > sshpp::sftp::File::try_rewind | ( | ) |
| SSHPP_INLINE Result< Attributes > sshpp::sftp::File::try_stat | ( | ) | const |
| SSHPP_INLINE Result< void > sshpp::sftp::File::try_truncate | ( | std::uint64_t | size | ) |
| SSHPP_INLINE Result< void > sshpp::sftp::File::try_close | ( | ) |
|
explicit |
|
delete |
|
delete |
Returns the next contiguous chunk in file order; empty span == EOF. The returned view is invalidated by the next call to try_next().
|
explicit |
|
delete |
|
delete |
| Result< void > sshpp::sftp::File::try_flush | ( | ) |
Waits for all in-flight writes to complete. Also called by the destructor (errors from that implicit call go to Library::set_destructor_error_handler()).
|
friend |