mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +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:
parent
efc61370c0
commit
d2ffcfb762
2 changed files with 0 additions and 17 deletions
|
@ -79,21 +79,6 @@ ErrorOr<NonnullOwnPtr<KString>> Custody::try_serialize_absolute_path() const
|
||||||
return string;
|
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
|
bool Custody::is_readonly() const
|
||||||
{
|
{
|
||||||
if (m_mount_flags & MS_RDONLY)
|
if (m_mount_flags & MS_RDONLY)
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include <AK/Error.h>
|
#include <AK/Error.h>
|
||||||
#include <AK/IntrusiveList.h>
|
#include <AK/IntrusiveList.h>
|
||||||
#include <AK/RefPtr.h>
|
#include <AK/RefPtr.h>
|
||||||
#include <AK/String.h>
|
|
||||||
#include <Kernel/Forward.h>
|
#include <Kernel/Forward.h>
|
||||||
#include <Kernel/KString.h>
|
#include <Kernel/KString.h>
|
||||||
#include <Kernel/Library/ListedRefCounted.h>
|
#include <Kernel/Library/ListedRefCounted.h>
|
||||||
|
@ -31,7 +30,6 @@ public:
|
||||||
Inode const& inode() const { return *m_inode; }
|
Inode const& inode() const { return *m_inode; }
|
||||||
StringView name() const { return m_name->view(); }
|
StringView name() const { return m_name->view(); }
|
||||||
ErrorOr<NonnullOwnPtr<KString>> try_serialize_absolute_path() const;
|
ErrorOr<NonnullOwnPtr<KString>> try_serialize_absolute_path() const;
|
||||||
String absolute_path() const;
|
|
||||||
|
|
||||||
int mount_flags() const { return m_mount_flags; }
|
int mount_flags() const { return m_mount_flags; }
|
||||||
bool is_readonly() const;
|
bool is_readonly() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue