aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/input-accessor.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-04-24 13:37:51 +0200
committerEelco Dolstra <edolstra@gmail.com>2023-04-24 13:37:51 +0200
commit5d3f6dbf59554fb4701cb678a4ef29918db97767 (patch)
treef456ce8583d750fdaad16457302b9935e9df3c84 /src/libfetchers/input-accessor.hh
parentad57cff9bc38a4a97f4ecccc7655e2dfd73fc75c (diff)
Add some more SourcePath docs
Diffstat (limited to 'src/libfetchers/input-accessor.hh')
-rw-r--r--src/libfetchers/input-accessor.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libfetchers/input-accessor.hh b/src/libfetchers/input-accessor.hh
index 1cb233c51..5a2f17f62 100644
--- a/src/libfetchers/input-accessor.hh
+++ b/src/libfetchers/input-accessor.hh
@@ -125,9 +125,17 @@ struct SourcePath
std::string to_string() const
{ return path.abs(); }
+ /**
+ * Append a `CanonPath` to this path.
+ */
SourcePath operator + (const CanonPath & x) const
{ return {path + x}; }
+ /**
+ * Append a single component `c` to this path. `c` must not
+ * contain a slash. A slash is implicitly added between this path
+ * and `c`.
+ */
SourcePath operator + (std::string_view c) const
{ return {path + c}; }