aboutsummaryrefslogtreecommitdiff
path: root/build/path
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-01-05 15:00:39 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-01-05 15:00:39 +0200
commit7e3f16c393a614e0a951abe3f7237c8169d689a9 (patch)
tree0943dbfad1e0fbf72e0ccd4f85eb2172d6fa91f6 /build/path
parentc0c85b67516653c181fbce7c61c2df3e31e4edd8 (diff)
Determine work, home, and {src,out}_{root,base} directories
Diffstat (limited to 'build/path')
-rw-r--r--build/path16
1 files changed, 15 insertions, 1 deletions
diff --git a/build/path b/build/path
index bdb9b72..ccc1b85 100644
--- a/build/path
+++ b/build/path
@@ -224,12 +224,26 @@ namespace build
basic_path
leaf () const;
+ // Return the path without the specified directory part. Throws
+ // invalid_path if the directory is not a prefix of *this. Expects
+ // both paths to be normalized.
+ //
+ basic_path
+ leaf (basic_path const&) const;
+
// Return the directory part of the path or empty path if
// there is no directory.
//
basic_path
directory () const;
+ // Return the directory part of the path without the specified
+ // leaf part. Throws invalid_path if the leaf is not a suffix of
+ // *this. Expects both paths to be normalized.
+ //
+ basic_path
+ directory (basic_path const&) const;
+
// Return the path without the extension, if any.
//
basic_path
@@ -297,7 +311,7 @@ namespace build
}
public:
- string_type
+ const string_type&
string () const
{
return path_;