Function tvix_build::oci::bundle::find_path_in_scratchs
source ยท fn find_path_in_scratchs<'a, 'b, I>(
search_path: &'a Path,
mountpoints: I,
) -> Option<(&'b Path, &'a Path)>
Expand description
For a given list of mountpoints (sorted) and a search_path, find the specific mountpoint parenting that search_path and return it, as well as the relative path from there to the search_path. mountpoints must be sorted, so we can iterate over the list from the back and match on the prefix.