1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

Kernel: Remove the Custody::absolute_path() API

With the last user removed this non-fallible API can now be removed.
This commit is contained in:
Idan Horowitz 2022-01-11 21:38:54 +02:00
parent efc61370c0
commit d2ffcfb762
2 changed files with 0 additions and 17 deletions

View file

@ -79,21 +79,6 @@ ErrorOr<NonnullOwnPtr<KString>> Custody::try_serialize_absolute_path() const
return string;
}
String Custody::absolute_path() const
{
if (!parent())
return "/";
Vector<Custody const*, 32> custody_chain;
for (auto const* custody = this; custody; custody = custody->parent())
custody_chain.append(custody);
StringBuilder builder;
for (int i = custody_chain.size() - 2; i >= 0; --i) {
builder.append('/');
builder.append(custody_chain[i]->name());
}
return builder.to_string();
}
bool Custody::is_readonly() const
{
if (m_mount_flags & MS_RDONLY)