Commit 17dca254 authored by Denis Krjuchkov's avatar Denis Krjuchkov

Path.hxx: add GetDirectoryName() method

parent f6b50d23
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment