diff options
author | Tim Schumacher <timschumi@gmx.de> | 2021-11-21 19:55:44 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-22 09:03:47 +0100 |
commit | 07351762c75e248d8bf77a2972e0527f02a7fa75 (patch) | |
tree | 9c4c1a5926aeda823e58bf45e2dcf8a325b71b9f /AK/LexicalPath.cpp | |
parent | 5f3e9886f713e9712abf8c1ac5b762ed6f89de3d (diff) | |
download | serenity-07351762c75e248d8bf77a2972e0527f02a7fa75.zip |
AK: Add LexicalPath::prepend()
Diffstat (limited to 'AK/LexicalPath.cpp')
-rw-r--r-- | AK/LexicalPath.cpp | 5 |
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(".."); |