Imported Upstream version 17.0.0
[platform/upstream/libzypp.git] / zypp / Pathname.h
index 2b55090..0a37556 100644 (file)
@@ -116,6 +116,9 @@ namespace zypp
       /** Test for a relative path. */
       bool relative() const { return !( absolute() || empty() ); }
 
+      /** Test for "" or "/". */
+      bool emptyOrRoot() const { return( _name.empty() || _name == "/" ); }
+
       /** Return all but the last component od this path. */
       Pathname dirname() const { return dirname( *this ); }
       static Pathname dirname( const Pathname & name_r );