1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:07:36 +00:00

AK: Add LexicalPath::is_child_of

This API checks whether this path is a child of (or the same as) another
path.
This commit is contained in:
kleines Filmröllchen 2022-06-24 00:40:21 +02:00 committed by Linus Groh
parent 4625f7aab5
commit 16ca41ec10
3 changed files with 58 additions and 0 deletions

View file

@ -33,6 +33,7 @@ public:
[[nodiscard]] Vector<DeprecatedString> parts() const;
bool has_extension(StringView) const;
bool is_child_of(LexicalPath const& possible_parent) const;
[[nodiscard]] LexicalPath append(StringView) const;
[[nodiscard]] LexicalPath prepend(StringView) const;