Follow-up from a review comment on #7012: #7012 (comment)
In include/xrpl/basics/FileUtilities.h, TempDir::path() and TempDir::file() both return std::string:
[[nodiscard]] std::string
path() const;
[[nodiscard]] std::string
file(std::string const& name) const;
Now that the codebase uses std::filesystem (#7012), these should probably return std::filesystem::path instead, so callers don't have to round-trip through strings. file() could likewise take a std::filesystem::path const& parameter.
This was intentionally left as-is in #7012 to keep that PR focused on the boost::filesystem → std::filesystem swap.
Work
- Change the return types (and
file()'s parameter type) to std::filesystem::path.
- Update call sites, which are mostly in tests/benchmarks.
Follow-up from a review comment on #7012: #7012 (comment)
In
include/xrpl/basics/FileUtilities.h,TempDir::path()andTempDir::file()both returnstd::string:Now that the codebase uses
std::filesystem(#7012), these should probably returnstd::filesystem::pathinstead, so callers don't have to round-trip through strings.file()could likewise take astd::filesystem::path const¶meter.This was intentionally left as-is in #7012 to keep that PR focused on the
boost::filesystem→std::filesystemswap.Work
file()'s parameter type) tostd::filesystem::path.