diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-23 14:41:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-23 14:47:25 +0200 |
commit | 67aabb1dca0ce7a4d8c62c07f0784132410fd63a (patch) | |
tree | 07693d3bc4e23c9c677891bcf5ff46363a7cce12 | |
parent | c443044ce146aee249722f662573e3b81c00d884 (diff) |
Add path::to_directory() predicate
-rw-r--r-- | butl/path | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |