summaryrefslogtreecommitdiff
path: root/AK/LexicalPath.cpp
AgeCommit message (Collapse)Author
2021-05-27LexicalPath: Reset dirname if it's emptyTim Schumacher
dirname ends up empty if the canonical path only contains one element. Reset it to the default for relative/absolute paths if that is the case.
2021-05-18AK: Make LexicalPath handle relative paths correctlyGunnar Beutner
Previously LexicalPath would consider "." and ".." as equivalent to "/". This is not true though.
2021-05-12AK: Add LexicalPath::append and LexicalPath::joinsin-ack
This patch adds two new methods to LexicalPath. LexicalPath::append appends a new path component to a LexicalPath, and LexicalPath::join constructs a new LexicalPath from one or more components. Co-authored-by: Gunnar Beutner <gunnar@beutner.name>
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-17AK: Make LexicalPath take String instead of StringViewAndreas Kling
2021-04-11AK: Update LexicalPath::relative_path to work for '/' prefixTim Waterhouse
If the prefix path is just a slash the LexicalPath was removing too many characters. Now only remove an extra character if the prefix is not just the root path.
2021-02-20AK: Add LexicalPath::relative_pathItamar
2020-09-25Meta+AK: Make clang-format-10 cleanBen Wiederhake
2020-07-15LexicalPath: Simplify a loopNico Weber
No behavior change.
2020-07-13AK: Make LexicalPath keep everything before the last dot as titleNico Weber
Previously, TextEditor would put "foo.txt" in the Save As dialog for files named "foo.bar.txt". Now, it puts "foo.bar.txt" instead.
2020-05-26AK: Rename FileSystemPath -> LexicalPathSergey Bugaev
And move canonicalized_path() to a static method on LexicalPath. This is to make it clear that FileSystemPath/canonicalized_path() only perform *lexical* canonicalization.