aboutsummaryrefslogtreecommitdiff
path: root/butl/path.ixx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-12-07 01:22:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-12-07 11:27:32 +0300
commit3e6110dec6f4cb004b8594b9b798a9db5b08fe7a (patch)
treee27cd6b75386752c7bf5cbe0bb35b55e17ff6c0e /butl/path.ixx
parente7b033d7b38bc55f934521b5f35060b43a8b0526 (diff)
Add path::current(), path::parent()
Diffstat (limited to 'butl/path.ixx')
-rw-r--r--butl/path.ixx16
1 files changed, 15 insertions, 1 deletions
diff --git a/butl/path.ixx b/butl/path.ixx
index c87a376..b1212f4 100644
--- a/butl/path.ixx
+++ b/butl/path.ixx
@@ -88,6 +88,20 @@ namespace butl
template <typename C, typename K>
inline bool basic_path<C, K>::
+ current () const
+ {
+ return traits::current (this->path_);
+ }
+
+ template <typename C, typename K>
+ inline bool basic_path<C, K>::
+ parent () const
+ {
+ return traits::parent (this->path_);
+ }
+
+ template <typename C, typename K>
+ inline bool basic_path<C, K>::
root () const
{
const string_type& s (this->path_);
@@ -232,7 +246,7 @@ namespace butl
complete ()
{
if (relative ())
- *this = current () / *this;
+ *this = current_directory () / *this;
return *this;
}