fn _lookup_file<S>(file: S) -> Result<PathBuf>
Expand description
- If file exists and is an absolute path, it is converted to host native form and returned.
- If file starts with %simics%, the rest of the path is looked up first in the current Simics project, and then in all configured Simics packages. If a match is found, the native form of the file found will be returned.
- If file exists in or relative to the current directory, it is returned without using the Simics search path. This is more or less equivalent of always having “.” first in the search path.
- For each directory in Simics search path: The directory and the file is concatenated and converted to host native format. Each such file is looked up first in the current Simics project, and then in all Simics packages. If a match is found, the native form of the file found will be returned.
§Examples
ⓘ
use simics::api::lookup_file;
lookup_file("%simics%/target/Software.efi")?;