Follow-up to #24265
~Marking as draft until #24265 is merged as this PR builds on top of that PR~
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
gArgs from bdb.h and sqlite.h by kiminuo)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
385 | @@ -399,6 +386,23 @@ std::optional<unsigned int> ArgsManager::GetArgFlags(const std::string& name) co 386 | return std::nullopt; 387 | } 388 | 389 | +fs::path ArgsManager::GetFileArg(std::string pathlike_arg, const fs::path& pathDefault) const
pathlike_arg is in snake case notation, pathDefault is in camel case notation.
Addressed in c71437c93611094aa57eb7da0e166159ff128bdd
Concept ACK, but I think PR description should be clearer. Also, I think it would be better to drop the first commit 42688109b38063902f4c2621db3e465a3c9b2218 here, and substitute commit b00c0c2a73b3c443f78b74eee60ff3e401b0269f from #24306. Main reason is that I think it is confusing to have separate GetPathArg and GetFileArg methods which are exactly the same except one strips trailing slashes and one doesn't. I don't think it's likely we will have a need for the one which preserves trailing slashes. The commit from the other PR also adds unit test coverage.
Let's close this in favor of https://github.com/bitcoin/bitcoin/pull/24306