summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/Custody.h
diff options
context:
space:
mode:
authorMax Wipfli <mail@maxwipfli.ch>2021-07-06 12:40:35 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-07 15:32:17 +0200
commit95f769ea5130a53103626afa0c81379715af6412 (patch)
treea96cd5a82b1a4b30f253404ce348fa6a9500a806 /Kernel/FileSystem/Custody.h
parent1f792faf34f74f7c01181470dd91453ff1d3b760 (diff)
downloadserenity-95f769ea5130a53103626afa0c81379715af6412.zip
Kernel: Add Custody::try_create_absolute_path()
This adds a way to get a Custody's absolute path as KString, which enables it to fail gracefully on OOM.
Diffstat (limited to 'Kernel/FileSystem/Custody.h')
-rw-r--r--Kernel/FileSystem/Custody.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/FileSystem/Custody.h b/Kernel/FileSystem/Custody.h
index 47b7815fd0..b2eaa1ee2c 100644
--- a/Kernel/FileSystem/Custody.h
+++ b/Kernel/FileSystem/Custody.h
@@ -30,6 +30,7 @@ public:
Inode& inode() { return *m_inode; }
const Inode& inode() const { return *m_inode; }
StringView name() const { return m_name->view(); }
+ OwnPtr<KString> try_create_absolute_path() const;
String absolute_path() const;
int mount_flags() const { return m_mount_flags; }