4#include <sshpp/config.hpp>
6#include <sshpp/export.hpp>
36 const std::filesystem::path& local,
39 const RemotePath& remote, TransferOptions = {});
40SSHPP_API Result<std::string>
try_read_file(Sftp&,
const RemotePath&, std::size_t limit = 16u << 20);
41SSHPP_API Result<void>
try_write_file(Sftp&,
const RemotePath&, ByteView,
42 std::filesystem::perms = std::filesystem::perms::owner_read |
43 std::filesystem::perms::owner_write);
51 const std::filesystem::path& local,
The SFTP subsystem session. See docs/design/06 ยง6.2.
Definition sftp.hpp:45
Definition algorithms.ipp:10
Overwrite
Definition algorithms.hpp:26
SSHPP_INLINE Result< std::uint64_t > try_upload(Sftp &sftp, const std::filesystem::path &local, const RemotePath &remote, TransferOptions opts)
Definition algorithms.ipp:69
SSHPP_INLINE Result< TreeStats > try_download_tree(Sftp &sftp, const RemotePath &remote, const std::filesystem::path &local, TransferOptions opts)
Definition algorithms.ipp:133
std::function< bool(const Progress &)> ProgressCallback
Return false to abort the transfer (yields errc::cancelled).
Definition algorithms.hpp:24
SSHPP_INLINE Result< std::string > try_read_file(Sftp &sftp, const RemotePath &path, std::size_t limit)
Definition algorithms.ipp:108
SSHPP_INLINE Result< std::uint64_t > try_download(Sftp &sftp, const RemotePath &remote, const std::filesystem::path &local, TransferOptions opts)
Definition algorithms.ipp:28
SSHPP_INLINE Result< void > try_write_file(Sftp &sftp, const RemotePath &path, ByteView data, std::filesystem::perms perms)
Definition algorithms.ipp:126
Definition algorithms.hpp:19
std::optional< std::uint64_t > bytes_total
Definition algorithms.hpp:21
std::uint64_t bytes_done
Definition algorithms.hpp:20
Definition algorithms.hpp:28
ProgressCallback progress
Definition algorithms.hpp:32
bool preserve_permissions
Definition algorithms.hpp:30
std::size_t chunk_size
Definition algorithms.hpp:31
Overwrite overwrite
Definition algorithms.hpp:29
Definition algorithms.hpp:45
std::uint64_t bytes
Definition algorithms.hpp:45
std::uint64_t directories
Definition algorithms.hpp:45
std::uint64_t files
Definition algorithms.hpp:45
std::uint64_t skipped
Definition algorithms.hpp:45