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

The SFTP subsystem session. See docs/design/06 §6.2. More...

#include <sftp.hpp>

Public Member Functions

 Sftp ()=default
 
 Sftp (Session &session)
 
 ~Sftp ()
 
 Sftp (Sftp &&) noexcept
 
Sftpoperator= (Sftp &&) noexcept
 
 Sftp (const Sftp &)=delete
 
Result< void > try_init ()
 
 operator bool () const noexcept
 
native_sftp native_handle () const noexcept
 
int protocol_version () const noexcept
 
Result< Limitstry_limits () const
 
Result< Filetry_open (const RemotePath &, OpenMode, std::filesystem::perms create_perms=std::filesystem::perms::owner_read|std::filesystem::perms::owner_write)
 
Result< Attributestry_stat (const RemotePath &) const
 
Result< Attributestry_lstat (const RemotePath &) const
 
Result< bool > try_exists (const RemotePath &) const
 
Result< void > try_chmod (const RemotePath &, std::filesystem::perms)
 
Result< void > try_chown (const RemotePath &, std::uint32_t uid, std::uint32_t gid)
 
Result< void > try_mkdir (const RemotePath &, std::filesystem::perms=std::filesystem::perms::owner_all)
 
Result< void > try_mkdir_p (const RemotePath &, std::filesystem::perms=std::filesystem::perms::owner_all)
 
Result< void > try_rmdir (const RemotePath &)
 
Result< void > try_remove (const RemotePath &)
 
Result< void > try_rename (const RemotePath &from, const RemotePath &to)
 
Result< void > try_symlink (const RemotePath &target, const RemotePath &link)
 
Result< RemotePathtry_readlink (const RemotePath &) const
 
Result< RemotePathtry_canonicalize (const RemotePath &) const
 
Result< Directorytry_open_directory (const RemotePath &) const
 
Result< std::vector< Attributes > > try_list (const RemotePath &) const
 

Detailed Description

The SFTP subsystem session. See docs/design/06 §6.2.

Constructor & Destructor Documentation

◆ Sftp() [1/4]

sshpp::sftp::Sftp::Sftp ( )
default

◆ Sftp() [2/4]

SSHPP_INLINE sshpp::sftp::Sftp::Sftp ( Session session)
explicit

◆ ~Sftp()

SSHPP_INLINE sshpp::sftp::Sftp::~Sftp ( )

◆ Sftp() [3/4]

SSHPP_INLINE sshpp::sftp::Sftp::Sftp ( Sftp &&  other)
noexcept

◆ Sftp() [4/4]

sshpp::sftp::Sftp::Sftp ( const Sftp )
delete

Member Function Documentation

◆ operator=()

SSHPP_INLINE Sftp & sshpp::sftp::Sftp::operator= ( Sftp &&  other)
noexcept

◆ try_init()

SSHPP_INLINE Result< void > sshpp::sftp::Sftp::try_init ( )

◆ operator bool()

sshpp::sftp::Sftp::operator bool ( ) const
inlineexplicitnoexcept

◆ native_handle()

native_sftp sshpp::sftp::Sftp::native_handle ( ) const
inlinenoexcept

◆ protocol_version()

SSHPP_INLINE int sshpp::sftp::Sftp::protocol_version ( ) const
noexcept

◆ try_limits()

SSHPP_INLINE Result< Limits > sshpp::sftp::Sftp::try_limits ( ) const

◆ try_open()

SSHPP_INLINE Result< File > sshpp::sftp::Sftp::try_open ( const RemotePath path,
OpenMode  mode,
std::filesystem::perms  create_perms = std::filesystem::perms::owner_read | std::filesystem::perms::owner_write 
)

◆ try_stat()

SSHPP_INLINE Result< Attributes > sshpp::sftp::Sftp::try_stat ( const RemotePath path) const

◆ try_lstat()

SSHPP_INLINE Result< Attributes > sshpp::sftp::Sftp::try_lstat ( const RemotePath path) const

◆ try_exists()

SSHPP_INLINE Result< bool > sshpp::sftp::Sftp::try_exists ( const RemotePath path) const

◆ try_chmod()

SSHPP_INLINE Result< void > sshpp::sftp::Sftp::try_chmod ( const RemotePath path,
std::filesystem::perms  perms 
)

◆ try_chown()

SSHPP_INLINE Result< void > sshpp::sftp::Sftp::try_chown ( const RemotePath path,
std::uint32_t  uid,
std::uint32_t  gid 
)

◆ try_mkdir()

SSHPP_INLINE Result< void > sshpp::sftp::Sftp::try_mkdir ( const RemotePath path,
std::filesystem::perms  perms = std::filesystem::perms::owner_all 
)

◆ try_mkdir_p()

SSHPP_INLINE Result< void > sshpp::sftp::Sftp::try_mkdir_p ( const RemotePath path,
std::filesystem::perms  perms = std::filesystem::perms::owner_all 
)

◆ try_rmdir()

SSHPP_INLINE Result< void > sshpp::sftp::Sftp::try_rmdir ( const RemotePath path)

◆ try_remove()

SSHPP_INLINE Result< void > sshpp::sftp::Sftp::try_remove ( const RemotePath path)

◆ try_rename()

SSHPP_INLINE Result< void > sshpp::sftp::Sftp::try_rename ( const RemotePath from,
const RemotePath to 
)

◆ try_symlink()

SSHPP_INLINE Result< void > sshpp::sftp::Sftp::try_symlink ( const RemotePath target,
const RemotePath link 
)

◆ try_readlink()

SSHPP_INLINE Result< RemotePath > sshpp::sftp::Sftp::try_readlink ( const RemotePath path) const

◆ try_canonicalize()

SSHPP_INLINE Result< RemotePath > sshpp::sftp::Sftp::try_canonicalize ( const RemotePath path) const

◆ try_open_directory()

SSHPP_INLINE Result< Directory > sshpp::sftp::Sftp::try_open_directory ( const RemotePath path) const

◆ try_list()

SSHPP_INLINE Result< std::vector< Attributes > > sshpp::sftp::Sftp::try_list ( const RemotePath path) const

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