summaryrefslogtreecommitdiff
path: root/libartbase/base/file_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'libartbase/base/file_utils.h')
-rw-r--r--libartbase/base/file_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libartbase/base/file_utils.h b/libartbase/base/file_utils.h
index d0d986b3ff..709ac12d14 100644
--- a/libartbase/base/file_utils.h
+++ b/libartbase/base/file_utils.h
@@ -168,6 +168,10 @@ bool LocationIsOnSystemExtFramework(std::string_view location);
// Return whether the location is on /apex/.
bool LocationIsOnApex(std::string_view location);
+// If the given location is /apex/<apexname>/..., return <apexname>, otherwise return an empty
+// string. Note that the result is a view into full_path and is valid only as long as it is.
+std::string_view ApexNameFromLocation(std::string_view full_path);
+
// Returns whether the location is trusted for loading oat files. Trusted locations are protected
// by dm-verity or fs-verity. The recognized locations are on /system or
// /data/misc/apexdata/com.android.art.