Function lief::dsc::load_from_path
pub fn load_from_path(path: &str, arch: &str) -> Option<DyldSharedCache>
Expand description
Load a shared cache from a single file or from a directory specified
by the path
parameter.
In the case where multiple architectures are
available in the path
directory, the arch
parameter can be used to
define which architecture should be prefered.
Example:
// From a directory (split caches)
let cache = lief::dsc::load("vision-pro-2.0/", "");
// From a single cache file
let cache = lief::dsc::load("ios-14.2/dyld_shared_cache_arm64", "");
// From a directory with multiple architectures
let cache = LIEF::dsc::load("macos-12.6/", /*arch=*/"x86_64h");