cppfs  1.2.0.5b71c2c98fb9
Cross-platform C++ file system library supporting multiple backends (Local-FS, SSH)
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cppfs::SshFileSystem Class Reference

Representation of a remote file system accessed by SSH. More...

#include <cppfs/include/cppfs/ssh/SshFileSystem.h>

Inheritance diagram for cppfs::SshFileSystem:
Inheritance graph
[legend]
Collaboration diagram for cppfs::SshFileSystem:
Collaboration graph
[legend]

Public Member Functions

 SshFileSystem (const std::string &host, int port, const std::string &username, const std::string &password, const std::string &publicKey, const std::string &privateKey)
 Constructor. More...
 
 SshFileSystem (std::string &&host, int port, std::string &&username, std::string &&password, std::string &&publicKey, std::string &&privateKey)
 Constructor. More...
 
virtual ~SshFileSystem ()
 Destructor. More...
 
virtual FileHandle open (const std::string &path) override
 Open file or directory in file system. More...
 
virtual FileHandle open (std::string &&path) override
 Open file or directory in file system. More...
 
- Public Member Functions inherited from cppfs::AbstractFileSystem
 AbstractFileSystem ()
 Constructor. More...
 
virtual ~AbstractFileSystem ()
 Destructor. More...
 

Protected Member Functions

void connect ()
 
void disconnect ()
 
void initSftp ()
 
void checkError ()
 

Protected Attributes

std::string m_host
 
int m_port
 
std::string m_username
 
std::string m_password
 
std::string m_publicKey
 
std::string m_privateKey
 
int m_socket
 Socket to host. More...
 
void * m_session
 SSH session handle. More...
 
void * m_sftpSession
 SFTP session handle. More...
 

Friends

class SshFileHandle
 
class SshFileIterator
 
class SshInputStreamBuffer
 
class SshOutputStreamBuffer
 

Detailed Description

Representation of a remote file system accessed by SSH.

Constructor & Destructor Documentation

cppfs::SshFileSystem::SshFileSystem ( const std::string &  host,
int  port,
const std::string &  username,
const std::string &  password,
const std::string &  publicKey,
const std::string &  privateKey 
)

Constructor.

Parameters
[in]hostHost name
[in]portPort
[in]usernameUser name
[in]passwordPassword
[in]publicKeyPath to public key file
[in]privateKeyPath to private key file
cppfs::SshFileSystem::SshFileSystem ( std::string &&  host,
int  port,
std::string &&  username,
std::string &&  password,
std::string &&  publicKey,
std::string &&  privateKey 
)

Constructor.

Parameters
[in]hostHost name
[in]portPort
[in]usernameUser name
[in]passwordPassword
[in]publicKeyPath to public key file
[in]privateKeyPath to private key file
virtual cppfs::SshFileSystem::~SshFileSystem ( )
virtual

Destructor.

Member Function Documentation

virtual FileHandle cppfs::SshFileSystem::open ( const std::string &  path)
overridevirtual

Open file or directory in file system.

Parameters
[in]pathPath to file or directory

Implements cppfs::AbstractFileSystem.

virtual FileHandle cppfs::SshFileSystem::open ( std::string &&  path)
overridevirtual

Open file or directory in file system.

Parameters
[in]pathPath to file or directory

Implements cppfs::AbstractFileSystem.

void cppfs::SshFileSystem::connect ( )
protected
void cppfs::SshFileSystem::disconnect ( )
protected
void cppfs::SshFileSystem::initSftp ( )
protected
void cppfs::SshFileSystem::checkError ( )
protected

Friends And Related Function Documentation

friend class SshFileHandle
friend
friend class SshFileIterator
friend
friend class SshInputStreamBuffer
friend
friend class SshOutputStreamBuffer
friend

Member Data Documentation

std::string cppfs::SshFileSystem::m_host
protected
int cppfs::SshFileSystem::m_port
protected
std::string cppfs::SshFileSystem::m_username
protected
std::string cppfs::SshFileSystem::m_password
protected
std::string cppfs::SshFileSystem::m_publicKey
protected
std::string cppfs::SshFileSystem::m_privateKey
protected
int cppfs::SshFileSystem::m_socket
protected

Socket to host.

void* cppfs::SshFileSystem::m_session
protected

SSH session handle.

void* cppfs::SshFileSystem::m_sftpSession
protected

SFTP session handle.


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