diff --git a/include/ircd/fs/fs.h b/include/ircd/fs/fs.h index 99818b9b6..34493b66d 100644 --- a/include/ircd/fs/fs.h +++ b/include/ircd/fs/fs.h @@ -48,6 +48,7 @@ namespace ircd::fs string_view get(index) noexcept; string_view name(index) noexcept; std::string make_path(const vector_view &); + std::string make_path(const vector_view &); bool exists(const string_view &path); bool is_dir(const string_view &path); diff --git a/ircd/fs.cc b/ircd/fs.cc index 443654a89..0674e406b 100644 --- a/ircd/fs.cc +++ b/ircd/fs.cc @@ -703,6 +703,16 @@ catch(const filesystem::filesystem_error &e) }; } +std::string +ircd::fs::make_path(const vector_view &list) +{ + filesystem::path ret; + for(const auto &s : list) + ret /= path(s); + + return ret.string(); +} + std::string ircd::fs::make_path(const vector_view &list) {