mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 18:22:57 +02:00
Add ArgsManager.GetDataDirBase() and ArgsManager.GetDataDirNet() as an intended replacement for ArgsManager.GetDataDirPath(net_identifier)
This commit is contained in:
@@ -119,7 +119,7 @@ UniValue RunCommandParseJSON(const std::string& str_command, const std::string&
|
||||
* the datadir if they are not absolute.
|
||||
*
|
||||
* @param path The path to be conditionally prefixed with datadir.
|
||||
* @param net_specific Forwarded to GetDataDir().
|
||||
* @param net_specific Use network specific datadir variant
|
||||
* @return The normalized path.
|
||||
*/
|
||||
fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific = true);
|
||||
@@ -268,6 +268,22 @@ public:
|
||||
*/
|
||||
const fs::path& GetBlocksDirPath() const;
|
||||
|
||||
/**
|
||||
* Get data directory path
|
||||
*
|
||||
* @return Absolute path on success, otherwise an empty path when a non-directory path would be returned
|
||||
* @post Returned directory path is created unless it is empty
|
||||
*/
|
||||
const fs::path& GetDataDirBase() const { return GetDataDirPath(false); }
|
||||
|
||||
/**
|
||||
* Get data directory path with appended network identifier
|
||||
*
|
||||
* @return Absolute path on success, otherwise an empty path when a non-directory path would be returned
|
||||
* @post Returned directory path is created unless it is empty
|
||||
*/
|
||||
const fs::path& GetDataDirNet() const { return GetDataDirPath(true); }
|
||||
|
||||
/**
|
||||
* Get data directory path
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user