summaryrefslogtreecommitdiff
path: root/AK/LexicalPath.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2021-11-21 19:55:44 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-22 09:03:47 +0100
commit07351762c75e248d8bf77a2972e0527f02a7fa75 (patch)
tree9c4c1a5926aeda823e58bf45e2dcf8a325b71b9f /AK/LexicalPath.cpp
parent5f3e9886f713e9712abf8c1ac5b762ed6f89de3d (diff)
downloadserenity-07351762c75e248d8bf77a2972e0527f02a7fa75.zip
AK: Add LexicalPath::prepend()
Diffstat (limited to 'AK/LexicalPath.cpp')
-rw-r--r--AK/LexicalPath.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/AK/LexicalPath.cpp b/AK/LexicalPath.cpp
index 7864c13983..a80d11236d 100644
--- a/AK/LexicalPath.cpp
+++ b/AK/LexicalPath.cpp
@@ -164,6 +164,11 @@ LexicalPath LexicalPath::append(StringView value) const
return LexicalPath::join(m_string, value);
}
+LexicalPath LexicalPath::prepend(StringView value) const
+{
+ return LexicalPath::join(value, m_string);
+}
+
LexicalPath LexicalPath::parent() const
{
return append("..");