[][src]Function botw_utils::get_canon_name_without_root

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

Convert a BOTW game resource path without a root folder into a canonical resource path. Most useful for normalizing paths to resources inside of SARC archives. Example:

use botw_utils::get_canon_name_without_root;
assert_eq!(
   get_canon_name_without_root("Actor/Pack/GameROMPlayer.sbactorpack"),
   "Actor/Pack/GameROMPlayer.bactorpack"
);

Arguments

  • file_path - The path of the BOTW game file, not relative to a root folder but bare. In most cases this would only come from a path inside of a SARC.

Returns

Returns the canonical resource path as a String.