MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetPathArg_

Method GetPathArg_

src/common/args.cpp:282–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282fs::path ArgsManager::GetPathArg_(std::string arg, const fs::path& default_value) const
283{
284 AssertLockHeld(cs_args);
285 const auto value = GetSetting_(arg);
286 if (value.isFalse()) return {};
287 std::string path_str = SettingToString(value, "");
288 if (path_str.empty()) return default_value;
289 fs::path result = fs::PathFromString(path_str).lexically_normal();
290 // Remove trailing slash, if present.
291 return result.has_filename() ? result : result.parent_path();
292}
293
294fs::path ArgsManager::GetPathArg(std::string arg, const fs::path& default_value) const
295{

Callers

nothing calls this directly

Calls 4

SettingToStringFunction · 0.85
PathFromStringFunction · 0.85
isFalseMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected