4#include <sshpp/config.hpp>
7#include <sshpp/export.hpp>
29 explicit operator
bool() const noexcept {
return native_ !=
nullptr; }
51 : native_(n), sftp_(sftp), core_(
std::move(core)), path_(
std::move(
path)) {}
62class SSHPP_API File::ReadAhead {
64 explicit ReadAhead(
File& file, std::size_t chunk = 0, std::size_t depth = 0);
76 std::deque<native_sftp_aio> inflight_;
81 std::vector<std::byte> buffer_;
82 bool reached_eof_ =
false;
86class SSHPP_API
File::WriteBehind {
101 std::deque<native_sftp_aio> inflight_;
Input byte range. Implicitly constructible from std::string_view / std::vector<std::byte>.
Definition types.hpp:54
Output byte range (caller-owned, mutable buffer to write into).
Definition types.hpp:67
A single open SFTP file handle. See docs/design/06 §6.3.
Definition file.hpp:21
ReadAhead(File &file, std::size_t chunk=0, std::size_t depth=0)
WriteBehind(File &file, std::size_t chunk=0, std::size_t depth=0)
Result< void > try_write(ByteView data)
Result< ByteView > try_next()
ReadAhead(ReadAhead &&)=delete
const RemotePath & path() const noexcept
Definition file.hpp:31
ReadAhead(const ReadAhead &)=delete
Result< void > try_flush()
WriteBehind(const WriteBehind &)=delete
native_sftp_file native_handle() const noexcept
Definition file.hpp:30
WriteBehind(WriteBehind &&)=delete
The SFTP subsystem session. See docs/design/06 §6.2.
Definition sftp.hpp:45
std::shared_ptr< SessionCore > SessionCorePtr
Definition session_core.hpp:43
Definition algorithms.ipp:10
::sftp_session_struct * native_sftp
Definition native_fwd.hpp:31
::sftp_file_struct * native_sftp_file
Definition native_fwd.hpp:32
std::filesystem::path path
Definition server_sftp_subsystem.ipp:38