diff --git a/include/ircd/fs/path.h b/include/ircd/fs/path.h index 84370b2fb..3c36e3bf2 100644 --- a/include/ircd/fs/path.h +++ b/include/ircd/fs/path.h @@ -48,6 +48,7 @@ namespace ircd::fs string_view extension(const mutable_buffer &, const string_view &path); string_view filename(const mutable_buffer &, const string_view &path); string_view relative(const mutable_buffer &, const string_view &root, const string_view &path); + string_view absolute(const mutable_buffer &, const string_view &root, const string_view &path); string_view canonical(const mutable_buffer &, const string_view &path); string_view canonical(const mutable_buffer &, const string_view &root, const string_view &path); string_view parent(const mutable_buffer &, const string_view &path); diff --git a/ircd/fs_path.cc b/ircd/fs_path.cc index a8f74c7d4..b4c95a91a 100644 --- a/ircd/fs_path.cc +++ b/ircd/fs_path.cc @@ -310,6 +310,14 @@ ircd::fs::relative(const mutable_buffer &buf, return path(buf, relative(_path(p), _path(root))); } +ircd::string_view +ircd::fs::absolute(const mutable_buffer &buf, + const string_view &root, + const string_view &p) +{ + return path(buf, absolute(_path(p), _path(root))); +} + ircd::string_view ircd::fs::filename(const mutable_buffer &buf, const string_view &p)