fs/Path: add method RelativeFS()

Move code from map_fs_to_utf8().
This commit is contained in:
Max Kellermann
2013-10-14 22:09:02 +02:00
parent 6fd481df97
commit 0b27ac2f5c
3 changed files with 36 additions and 11 deletions

View File

@@ -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