aboutsummaryrefslogtreecommitdiff
path: root/butl/path
diff options
context:
space:
mode:
Diffstat (limited to 'butl/path')
-rw-r--r--butl/path6
1 files changed, 6 insertions, 0 deletions
diff --git a/butl/path b/butl/path
index 967afe7..aafc2aa 100644
--- a/butl/path
+++ b/butl/path
@@ -549,6 +549,12 @@ namespace butl
bool
root () const;
+ // Test, based on the presence/absence of the trailing separator, if the
+ // path is to a directory.
+ //
+ bool
+ to_directory () const {return this->tsep_ != 0;}
+
// Return true if *this is a sub-path of the specified path (i.e.,
// the specified path is a prefix). Expects both paths to be
// normalized. Note that this function returns true if the paths