diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-03 09:45:57 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-03 09:45:57 +0200 |
commit | 987b9b881b93115ead849c087c0dc2e3f1532b1e (patch) | |
tree | 00d979e39a97ee623886ec60a85a4990c8ec0f9c /libbuild2/name.hxx | |
parent | 2650fe1faaee8202cb7361f2e8cf0c790c3fd946 (diff) |
Add name::file() predicate
Diffstat (limited to 'libbuild2/name.hxx')
-rw-r--r-- | libbuild2/name.hxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libbuild2/name.hxx b/libbuild2/name.hxx index 39d2396..8756cb7 100644 --- a/libbuild2/name.hxx +++ b/libbuild2/name.hxx @@ -93,6 +93,14 @@ namespace build2 untyped () && !dir.empty () && value.empty (); } + // File path-like (only optional directory and non-empty value). + // + bool + file (bool ignore_qual = false) const + { + return (ignore_qual || unqualified ()) && untyped () && !value.empty (); + } + int compare (const name&) const; }; |