wallet: Add ListWalletDir utility

ListWalletDir returns all available wallets in the current wallet directory.

Based on MeshCollider work in pull #11485.
This commit is contained in:
João Barbosa
2018-09-22 00:24:29 +01:00
parent 920c090f63
commit fc4db35bfd
2 changed files with 56 additions and 2 deletions

View File

@@ -5,10 +5,14 @@
#ifndef BITCOIN_WALLET_WALLETUTIL_H
#define BITCOIN_WALLET_WALLETUTIL_H
#include <chainparamsbase.h>
#include <util.h>
#include <fs.h>
#include <vector>
//! Get the path of the wallet directory.
fs::path GetWalletDir();
//! Get wallets in wallet directory.
std::vector<fs::path> ListWalletDir();
#endif // BITCOIN_WALLET_WALLETUTIL_H