summaryrefslogtreecommitdiffstats
path: root/raul/Path.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'raul/Path.hpp')
-rw-r--r--raul/Path.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/raul/Path.hpp b/raul/Path.hpp
index 5119530..ffa8aa0 100644
--- a/raul/Path.hpp
+++ b/raul/Path.hpp
@@ -173,6 +173,15 @@ public:
return str() + "/";
}
+ /** Return path with a trailing "/".
+ *
+ * Returned value is guaranteed to be a valid parent path, i.e. a valid
+ * child path can be made using parent.base() + child_name.
+ */
+ inline const std::string base_no_scheme() const {
+ return base().substr(find(":") + 1);
+ }
+
/** Return true if \a child is equal to, or a descendant of \a parent */
static bool descendant_comparator(const Path& parent, const Path& child) {