aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/Path.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/Path.hxx')
-rw-r--r--src/fs/Path.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fs/Path.hxx b/src/fs/Path.hxx
index 8635d12a9..eaab2bde5 100644
--- a/src/fs/Path.hxx
+++ b/src/fs/Path.hxx
@@ -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