- unsigned size() const;
- bool is_absolute() const;
- Path subpath(unsigned, unsigned =(unsigned)-1) const;
- Path operator/(const Path &p) const { Path a=*this; a/=p; return a; }
- Path &operator/=(const Path &);
+
+ /// Returns the number of components in the path.
+ unsigned size() const;
+
+ bool empty() const { return path.empty(); }
+
+ /// Determines whether the path starts from the root directory
+ bool is_absolute() const;
+
+ /// Extracts a range of components from the path.
+ Path subpath(unsigned start, unsigned count=static_cast<unsigned>(-1)) const;
+
+ /// Concatenates this path with another one, with usual filesystem semantics
+ Path operator/(const Path &p) const;
+ Path &operator/=(const Path &);
+
+ /**
+ Extracts a single component from the path. Negative indices count from the
+ end of the path.
+ */