summaryrefslogtreecommitdiff
path: root/services/incremental/path.h
diff options
context:
space:
mode:
author Yurii Zubrytskyi <zyy@google.com> 2020-01-10 11:53:24 -0800
committer Yurii Zubrytskyi <zyy@google.com> 2020-01-28 12:10:17 -0800
commit4a25dfb2de3cf0f6dd81f4add3fd905db0834a38 (patch)
treefb36a044655007025be9e3fa8fb189281ac9698c /services/incremental/path.h
parent092993a72d710b7f5cb0f53aed736fd2675345e3 (diff)
Port the current code to new IncFS
Bug: 146080380 Test: manual, "cmd incremental install-start" Change-Id: I6761c3f0e58b6d4de1ae3c4b31c23204fba9f740
Diffstat (limited to 'services/incremental/path.h')
-rw-r--r--services/incremental/path.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/incremental/path.h b/services/incremental/path.h
index a1f4b8ec3093..3e5fd21b6535 100644
--- a/services/incremental/path.h
+++ b/services/incremental/path.h
@@ -67,6 +67,20 @@ inline details::CStrWrapper c_str(std::string_view sv) {
return {sv};
}
+std::string_view relativize(std::string_view parent, std::string_view nested);
+inline std::string_view relativize(const char* parent, const char* nested) {
+ return relativize(std::string_view(parent), std::string_view(nested));
+}
+inline std::string_view relativize(std::string_view parent, const char* nested) {
+ return relativize(parent, std::string_view(nested));
+}
+inline std::string_view relativize(const char* parent, std::string_view nested) {
+ return relativize(std::string_view(parent), nested);
+}
+
+std::string_view relativize(std::string&& parent, std::string_view nested) = delete;
+std::string_view relativize(std::string_view parent, std::string&& nested) = delete;
+
bool isAbsolute(std::string_view path);
std::string normalize(std::string_view path);
std::string_view dirname(std::string_view path);