aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/Path.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-14 22:09:02 +0200
committerMax Kellermann <max@duempel.org>2013-10-14 22:09:02 +0200
commit0b27ac2f5c6a352be733f00e873ceb9d0904e92a (patch)
treed0b5775b1e0afe08b4c4873ec8887f548d3e8fe0 /src/fs/Path.hxx
parent6fd481df978ad4666780ef838e6c8540f6ea190f (diff)
downloadmpd-0b27ac2f5c6a352be733f00e873ceb9d0904e92a.tar.gz
mpd-0b27ac2f5c6a352be733f00e873ceb9d0904e92a.tar.xz
mpd-0b27ac2f5c6a352be733f00e873ceb9d0904e92a.zip
fs/Path: add method RelativeFS()
Move code from map_fs_to_utf8().
Diffstat (limited to 'src/fs/Path.hxx')
-rw-r--r--src/fs/Path.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fs/Path.hxx b/src/fs/Path.hxx
index 9bbedeeab..52a62ae76 100644
--- a/src/fs/Path.hxx
+++ b/src/fs/Path.hxx
@@ -223,6 +223,15 @@ public:
*/
gcc_pure
Path GetDirectoryName() const;
+
+ /**
+ * 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
+ const char *RelativeFS(const char *other_fs) const;
};
#endif