8#include <sshpp/config.hpp>
12#include <sshpp/export.hpp>
54 explicit operator
bool() const noexcept {
return native_ !=
nullptr; }
80 explicit operator
bool() const noexcept {
return native_ !=
nullptr; }
84 Result<void> try_push_file(std::string_view name, std::uint64_t size,
85 std::filesystem::perms = std::filesystem::perms::owner_read |
86 std::filesystem::perms::owner_write);
88 std::filesystem::perms = std::filesystem::perms::owner_all);
100SSHPP_API Result<std::uint64_t>
try_download(Session&,
const RemotePath&,
102SSHPP_API Result<std::uint64_t>
try_upload(Session&,
const std::filesystem::path&,
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
Definition session.hpp:41
Pull side of an SCP transfer: scp -f as seen by the client.
Definition scp.hpp:45
Push side of an SCP transfer: scp -t as seen by the client.
Definition scp.hpp:71
std::shared_ptr< SessionCore > SessionCorePtr
Definition session_core.hpp:43
SSHPP_INLINE Result< std::uint64_t > try_upload(Session &session, const std::filesystem::path &local, const RemotePath &remote, ProgressCallback progress)
Definition scp.ipp:312
RequestType
Definition scp.hpp:27
SSHPP_INLINE Result< std::uint64_t > try_download(Session &session, const RemotePath &remote, const std::filesystem::path &local, ProgressCallback progress)
Definition scp.ipp:269
Mode
Definition scp.hpp:26
std::function< bool(const Progress &)> ProgressCallback
Return false to abort the transfer (yields errc::cancelled).
Definition scp.hpp:42
::ssh_scp_struct * native_scp
Definition native_fwd.hpp:34
std::optional< std::uint64_t > bytes_total
Definition scp.hpp:39
std::uint64_t bytes_done
Definition scp.hpp:38
std::uint64_t size
Definition scp.hpp:32
std::string warning
Definition scp.hpp:34
RequestType type
Definition scp.hpp:30
std::string name
Definition scp.hpp:31
std::filesystem::perms permissions
Definition scp.hpp:33