mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 05:03:16 +01:00
wallet: Add WalletLocation utility class
This commit is contained in:
@@ -15,4 +15,24 @@ fs::path GetWalletDir();
|
||||
//! Get wallets in wallet directory.
|
||||
std::vector<fs::path> ListWalletDir();
|
||||
|
||||
//! The WalletLocation class provides wallet information.
|
||||
class WalletLocation final
|
||||
{
|
||||
std::string m_name;
|
||||
fs::path m_path;
|
||||
|
||||
public:
|
||||
explicit WalletLocation() {}
|
||||
explicit WalletLocation(const std::string& name);
|
||||
|
||||
//! Get wallet name.
|
||||
const std::string& GetName() const { return m_name; }
|
||||
|
||||
//! Get wallet absolute path.
|
||||
const fs::path& GetPath() const { return m_path; }
|
||||
|
||||
//! Return whether the wallet exists.
|
||||
bool Exists() const;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_WALLET_WALLETUTIL_H
|
||||
|
||||
Reference in New Issue
Block a user