diff options
Diffstat (limited to 'include/filepath.h')
-rw-r--r-- | include/filepath.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/filepath.h b/include/filepath.h index 6308f2ae..795a6dfb 100644 --- a/include/filepath.h +++ b/include/filepath.h @@ -64,6 +64,10 @@ public: bool operator==(const Filepath&) const; bool operator!=(const Filepath&) const; + bool operator<(const Filepath&) const; + bool operator<=(const Filepath&) const; + bool operator>(const Filepath&) const; + bool operator>=(const Filepath&) const; /// Returns the filepath as a string in locale encoding. /// @@ -95,8 +99,9 @@ public: // Return `true` if Filepath start with `base`, `false` otherwise. // - // \note `ext` is interpreted as bytes in locale encoding. - bool starts_with(const std::string& base) const; + // Only considers whole path components to match, i.e. "/foo" is **not** + // a prefix of "/foobar/baz". + bool starts_with(const Filepath& base) const; /// Returns the final component of the path, if there is one. nonstd::optional<Filepath> file_name() const; |