]> git.tdb.fi Git - libs/core.git/blobdiff - source/path.h
Add Path::empty()
[libs/core.git] / source / path.h
index f52362230ebf538468734aa4ddfd1e2cc32e0df9..9e1e3747fed37c0b6687ee48c0925071bbccd6ea 100644 (file)
@@ -45,7 +45,8 @@ public:
        Path(const std::string &p)     { init(p); }
        Path(const char *p)            { init(p); }
        const std::string &str() const { return path; }
-       unsigned  size() const;
+       unsigned    size() const;
+       bool        empty() const { return path.empty(); }
        bool        is_absolute() const;
        Path        subpath(unsigned, unsigned =(unsigned)-1) const;
        Path        operator/(const Path &p) const { Path a=*this; a/=p; return a; }