mirror of
https://github.com/matrix-construct/construct
synced 2024-10-01 05:08:59 +02:00
ircd::fs::path: Add absolute() to interface.
This commit is contained in:
parent
cb223b97c0
commit
34cf3e032e
2 changed files with 9 additions and 0 deletions
|
@ -48,6 +48,7 @@ namespace ircd::fs
|
||||||
string_view extension(const mutable_buffer &, const string_view &path);
|
string_view extension(const mutable_buffer &, const string_view &path);
|
||||||
string_view filename(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 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 &path);
|
||||||
string_view canonical(const mutable_buffer &, const string_view &root, 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);
|
string_view parent(const mutable_buffer &, const string_view &path);
|
||||||
|
|
|
@ -310,6 +310,14 @@ ircd::fs::relative(const mutable_buffer &buf,
|
||||||
return path(buf, relative(_path(p), _path(root)));
|
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::string_view
|
||||||
ircd::fs::filename(const mutable_buffer &buf,
|
ircd::fs::filename(const mutable_buffer &buf,
|
||||||
const string_view &p)
|
const string_view &p)
|
||||||
|
|
Loading…
Reference in a new issue