fs/Path: add method GetSuffix()

Type-safe wrapper for uri_get_suffix().
This commit is contained in:
Max Kellermann
2015-03-01 01:09:53 +01:00
parent 41cc31c124
commit 7ce96585f5
5 changed files with 14 additions and 4 deletions

View File

@@ -20,9 +20,16 @@
#include "config.h"
#include "Path.hxx"
#include "Charset.hxx"
#include "util/UriUtil.hxx"
std::string
Path::ToUTF8() const
{
return ::PathToUTF8(c_str());
}
const char *
Path::GetSuffix() const
{
return uri_get_suffix(c_str());
}

View File

@@ -161,6 +161,9 @@ public:
bool IsAbsolute() const {
return PathTraitsFS::IsAbsolute(c_str());
}
gcc_pure
const char *GetSuffix() const;
};
#endif