Path.hxx: add GetDirectoryName() method
This commit is contained in:
parent
f6b50d2387
commit
17dca254a3
|
@ -253,6 +253,15 @@ public:
|
||||||
std::string ToUTF8() const {
|
std::string ToUTF8() const {
|
||||||
return ToUTF8(value);
|
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
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue