[][src]Function botw_utils::get_canon_name

pub fn get_canon_name<P: AsRef<Path>>(file_path: P) -> Option<String>

Convert a path relative to a BOTW content root into a canonical resource path. Example:

use botw_utils::get_canon_name;
assert_eq!(
   get_canon_name("content\\Actor\\Pack\\Enemy_Lizalfos_Senior.sbactorpack").unwrap(),
   "Actor/Pack/Enemy_Lizalfos_Senior.bactorpack"
);

Arguments

  • file_path - The path of the BOTW game file relative to the root folder

Returns

Returns an Option with the canonical resource path as a String or None if the path does not appear valid