aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/Traits.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/Traits.hxx')
-rw-r--r--src/fs/Traits.hxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/fs/Traits.hxx b/src/fs/Traits.hxx
index 323656991..88715c3e8 100644
--- a/src/fs/Traits.hxx
+++ b/src/fs/Traits.hxx
@@ -106,6 +106,15 @@ struct PathTraitsFS {
static string GetParent(const_pointer p);
/**
+ * Determine the relative part of the given path to this
+ * object, not including the directory separator. Returns an
+ * empty string if the given path equals this object or
+ * nullptr on mismatch.
+ */
+ gcc_pure gcc_nonnull_all
+ static const_pointer Relative(const_pointer base, const_pointer other);
+
+ /**
* Constructs the path from the given components.
* If either of the components is empty string,
* remaining component is returned unchanged.
@@ -180,6 +189,15 @@ struct PathTraitsUTF8 {
static string GetParent(const_pointer p);
/**
+ * Determine the relative part of the given path to this
+ * object, not including the directory separator. Returns an
+ * empty string if the given path equals this object or
+ * nullptr on mismatch.
+ */
+ gcc_pure gcc_nonnull_all
+ static const_pointer Relative(const_pointer base, const_pointer other);
+
+ /**
* Constructs the path from the given components.
* If either of the components is empty string,
* remaining component is returned unchanged.