aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/directory.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/directory.h b/src/directory.h
index afe81faad..36f0deb18 100644
--- a/src/directory.h
+++ b/src/directory.h
@@ -71,6 +71,15 @@ directory_get_path(const struct directory *directory)
}
/**
+ * Is this the root directory of the music database?
+ */
+static inline bool
+directory_is_root(const struct directory *directory)
+{
+ return directory->parent == NULL;
+}
+
+/**
* Returns the base name of the directory.
*/
const char *