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
Notes: sideshowbarker 2024-07-17 21:03:37 +09:00
2 changed files with 0 additions and 17 deletions
Kernel/FileSystem

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)

View file

@ -9,7 +9,6 @@
#include <AK/Error.h>
#include <AK/IntrusiveList.h>
#include <AK/RefPtr.h>
#include <AK/String.h>
#include <Kernel/Forward.h>
#include <Kernel/KString.h>
#include <Kernel/Library/ListedRefCounted.h>
@ -31,7 +30,6 @@ public:
Inode const& inode() const { return *m_inode; }
StringView name() const { return m_name->view(); }
ErrorOr<NonnullOwnPtr<KString>> try_serialize_absolute_path() const;
String absolute_path() const;
int mount_flags() const { return m_mount_flags; }
bool is_readonly() const;