|
libsshpp v0.1.7
Modern C++17 wrapper for libssh
|
Classes | |
| struct | Progress |
| class | Reader |
Pull side of an SCP transfer: scp -f as seen by the client. More... | |
| struct | Request |
| class | Writer |
Push side of an SCP transfer: scp -t as seen by the client. More... | |
Typedefs | |
| using | ProgressCallback = std::function< bool(const Progress &)> |
| Return false to abort the transfer (yields errc::cancelled). | |
Enumerations | |
| enum class | Mode { read , write , read_recursive , write_recursive } |
| enum class | RequestType { new_file , new_directory , end_directory , eof , warning } |
Functions | |
| SSHPP_INLINE Result< std::uint64_t > | try_download (Session &session, const RemotePath &remote, const std::filesystem::path &local, ProgressCallback progress) |
| SSHPP_INLINE Result< std::uint64_t > | try_upload (Session &session, const std::filesystem::path &local, const RemotePath &remote, ProgressCallback progress) |
| using sshpp::scp::ProgressCallback = typedef std::function<bool(const Progress&)> |
Return false to abort the transfer (yields errc::cancelled).
|
strong |
|
strong |
| SSHPP_API Result< std::uint64_t > sshpp::scp::try_download | ( | Session & | , |
| const RemotePath & | , | ||
| const std::filesystem::path & | , | ||
| ProgressCallback | = {} |
||
| ) |
Layer-4 one-liners with the same name-validation hardening as the SFTP tree helpers (cf. CVE-2019-6111: a malicious server sending unexpected filenames).
| SSHPP_API Result< std::uint64_t > sshpp::scp::try_upload | ( | Session & | session, |
| const std::filesystem::path & | local, | ||
| const RemotePath & | remote, | ||
| ProgressCallback | progress | ||
| ) |