Path.hxx: add GetDirectoryName() method

This commit is contained in:
Denis Krjuchkov 2013-02-02 19:28:02 +06:00
parent f6b50d2387
commit 17dca254a3
1 changed files with 9 additions and 0 deletions

View File

@ -253,6 +253,15 @@ public:
std::string ToUTF8() const {
return ToUTF8(value);
}
/**
* Gets directory name of this path.
* Returns a "nulled" instance on error.
*/
Path GetDirectoryName() const {
assert(value != nullptr);
return Path(Donate(), g_path_get_dirname(value));
}
};
#endif