libsshpp v0.1.7
Modern C++17 wrapper for libssh
Loading...
Searching...
No Matches
sshpp::scp::Writer Class Reference

Push side of an SCP transfer: scp -t as seen by the client. More...

#include <scp.hpp>

Public Member Functions

 Writer ()=default
 
 Writer (Session &session, const RemotePath &destination_dir, bool recursive)
 
 ~Writer ()
 
 Writer (Writer &&) noexcept
 
Writeroperator= (Writer &&) noexcept
 
 Writer (const Writer &)=delete
 
 operator bool () const noexcept
 
Result< void > try_init ()
 
Result< void > try_push_file (std::string_view name, std::uint64_t size, std::filesystem::perms=std::filesystem::perms::owner_read|std::filesystem::perms::owner_write)
 
Result< void > try_push_directory (std::string_view name, std::filesystem::perms=std::filesystem::perms::owner_all)
 
Result< void > try_leave_directory ()
 
Result< void > try_write (ByteView)
 
Result< std::uint64_t > try_write_from (std::istream &, std::uint64_t size, ProgressCallback={})
 

Detailed Description

Push side of an SCP transfer: scp -t as seen by the client.

Constructor & Destructor Documentation

◆ Writer() [1/4]

sshpp::scp::Writer::Writer ( )
default

◆ Writer() [2/4]

SSHPP_INLINE sshpp::scp::Writer::Writer ( Session session,
const RemotePath destination_dir,
bool  recursive 
)

◆ ~Writer()

SSHPP_INLINE sshpp::scp::Writer::~Writer ( )

◆ Writer() [3/4]

SSHPP_INLINE sshpp::scp::Writer::Writer ( Writer &&  other)
noexcept

◆ Writer() [4/4]

sshpp::scp::Writer::Writer ( const Writer )
delete

Member Function Documentation

◆ operator=()

SSHPP_INLINE Writer & sshpp::scp::Writer::operator= ( Writer &&  other)
noexcept

◆ operator bool()

sshpp::scp::Writer::operator bool ( ) const
inlineexplicitnoexcept

◆ try_init()

SSHPP_INLINE Result< void > sshpp::scp::Writer::try_init ( )

◆ try_push_file()

SSHPP_INLINE Result< void > sshpp::scp::Writer::try_push_file ( std::string_view  name,
std::uint64_t  size,
std::filesystem::perms  perms = std::filesystem::perms::owner_read | std::filesystem::perms::owner_write 
)

◆ try_push_directory()

SSHPP_INLINE Result< void > sshpp::scp::Writer::try_push_directory ( std::string_view  name,
std::filesystem::perms  perms = std::filesystem::perms::owner_all 
)

◆ try_leave_directory()

SSHPP_INLINE Result< void > sshpp::scp::Writer::try_leave_directory ( )

◆ try_write()

SSHPP_INLINE Result< void > sshpp::scp::Writer::try_write ( ByteView  data)

◆ try_write_from()

SSHPP_INLINE Result< std::uint64_t > sshpp::scp::Writer::try_write_from ( std::istream &  in,
std::uint64_t  size,
ProgressCallback  progress = {} 
)

The documentation for this class was generated from the following files: