cppfs
1.2.0.5b71c2c98fb9
Cross-platform C++ file system library supporting multiple backends (Local-FS, SSH)
|
Login credentials for accessing file systems (e.g., username, password, key files, etc.) More...
#include <cppfs/include/cppfs/LoginCredentials.h>
Public Member Functions | |
LoginCredentials () | |
Constructor. More... | |
LoginCredentials (const LoginCredentials &loginCredentials) | |
Copy constructor. More... | |
LoginCredentials (const LoginCredentials &&loginCredentials) | |
Move constructor. More... | |
virtual | ~LoginCredentials () |
Destructor. More... | |
LoginCredentials & | operator= (const LoginCredentials &loginCredentials) |
Copy assignment operator. More... | |
LoginCredentials & | operator= (LoginCredentials &&loginCredentials) |
Move assignment operator. More... | |
bool | load (const std::string &path) |
Load login credentials from file. More... | |
bool | save (const std::string &path) const |
Save login credentials to file. More... | |
bool | isSet (const std::string &key) const |
Check if a value is set for a given key. More... | |
const std::string & | value (const std::string &key) const |
Get value for key. More... | |
void | setValue (const std::string &key, const std::string &value) |
Set value for key. More... | |
void | setValue (const std::string &key, std::string &&value) |
Set value for key. More... | |
Protected Attributes | |
std::map< std::string, std::string > | m_values |
Key/value pairs. More... | |
Login credentials for accessing file systems (e.g., username, password, key files, etc.)
This class is used to pass additional login credentials needed to acces file systems, for example include username, password, port numbers, or paths to key files. It can contain arbitrary key/value pairs that are defined and interpreted by the respective file system implementations. See the documentation for a specific file system implementation to learn what options it supports.
cppfs::LoginCredentials::LoginCredentials | ( | ) |
Constructor.
cppfs::LoginCredentials::LoginCredentials | ( | const LoginCredentials & | loginCredentials | ) |
Copy constructor.
[in] | loginCredentials | Right-hand value to copy |
cppfs::LoginCredentials::LoginCredentials | ( | const LoginCredentials && | loginCredentials | ) |
Move constructor.
[in] | loginCredentials | Right-hand value to copy |
|
virtual |
Destructor.
LoginCredentials& cppfs::LoginCredentials::operator= | ( | const LoginCredentials & | loginCredentials | ) |
Copy assignment operator.
[in] | loginCredentials | Right-hand value to copy |
LoginCredentials& cppfs::LoginCredentials::operator= | ( | LoginCredentials && | loginCredentials | ) |
Move assignment operator.
[in] | loginCredentials | Right-hand value to move |
bool cppfs::LoginCredentials::load | ( | const std::string & | path | ) |
Load login credentials from file.
[in] | path | Path to file |
bool cppfs::LoginCredentials::save | ( | const std::string & | path | ) | const |
Save login credentials to file.
[in] | path | Path to file |
bool cppfs::LoginCredentials::isSet | ( | const std::string & | key | ) | const |
Check if a value is set for a given key.
[in] | key | Key |
const std::string& cppfs::LoginCredentials::value | ( | const std::string & | key | ) | const |
Get value for key.
[in] | key | Key |
void cppfs::LoginCredentials::setValue | ( | const std::string & | key, |
const std::string & | value | ||
) |
Set value for key.
[in] | key | Key |
[in] | value | Value for key |
void cppfs::LoginCredentials::setValue | ( | const std::string & | key, |
std::string && | value | ||
) |
Set value for key.
[in] | key | Key |
[in] | value | Value for key |
|
protected |
Key/value pairs.