Bitcoin Core  0.18.99
P2P Digital Currency
walletutil.h
Go to the documentation of this file.
1 // Copyright (c) 2017-2018 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_WALLET_WALLETUTIL_H
6 #define BITCOIN_WALLET_WALLETUTIL_H
7 
8 #include <fs.h>
9 
10 #include <vector>
11 
13 fs::path GetWalletDir();
14 
16 std::vector<fs::path> ListWalletDir();
17 
19 class WalletLocation final
20 {
21  std::string m_name;
22  fs::path m_path;
23 
24 public:
25  explicit WalletLocation() {}
26  explicit WalletLocation(const std::string& name);
27 
29  const std::string& GetName() const { return m_name; }
30 
32  const fs::path& GetPath() const { return m_path; }
33 
35  bool Exists() const;
36 };
37 
38 #endif // BITCOIN_WALLET_WALLETUTIL_H
const fs::path & GetPath() const
Get wallet absolute path.
Definition: walletutil.h:32
fs::path GetWalletDir()
Get the path of the wallet directory.
Definition: dummywallet.cpp:57
fs::path m_path
Definition: walletutil.h:22
std::vector< fs::path > ListWalletDir()
Get wallets in wallet directory.
Definition: dummywallet.cpp:62
bool Exists() const
Return whether the wallet exists.
Definition: walletutil.cpp:101
std::string m_name
Definition: walletutil.h:21
const std::string & GetName() const
Get wallet name.
Definition: walletutil.h:29
const char * name
Definition: rest.cpp:38
The WalletLocation class provides wallet information.
Definition: walletutil.h:19