0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-28 06:48:20 +02:00

ircd::fs::path: Add absolute() to interface.

This commit is contained in:
Jason Volk 2020-11-14 00:46:06 -08:00
parent cb223b97c0
commit 34cf3e032e
2 changed files with 9 additions and 0 deletions

View file

@ -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);

View file

@ -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)