(path: P)
| 94 | pick_file_impl(title, filters) |
| 95 | } |
| 96 | |
| 97 | pub fn resolve_path_string<P: ResPathSource>(path: P) -> String { |
| 98 | let path = path.as_res_path_str(); |
| 99 | if let Err(err) = validate_virtual_asset_path(path) { |
| 100 | return format!("invalid://{err}"); |
| 101 | } |
| 102 | match perro_io::resolve_path(path) { |
| 103 | perro_io::ResolvedPath::Excluded(path) => format!("excluded+demo://{path}"), |
| 104 | perro_io::ResolvedPath::Disk(pb) => pb.to_string_lossy().to_string(), |
| 105 | perro_io::ResolvedPath::WebUserStorage(key) => format!("webstorage://{key}"), |
| 106 | perro_io::ResolvedPath::PerroAssets(vpath) => format!("perroassets://{vpath}"), |
| 107 | perro_io::ResolvedPath::StaticBinary(path) => format!("staticbinary://{path}"), |
| 108 | perro_io::ResolvedPath::DlcStaticBinary { dlc, path } => { |
| 109 | format!("staticbinary+dlc://{dlc}/{path}") |
| 110 | } |
| 111 | perro_io::ResolvedPath::DlcPerroAssets { dlc, virtual_path } => { |
| 112 | format!("perroassets+dlc://{dlc}/{virtual_path}") |
| 113 | } |
| 114 | } |
| 115 | } |
| 116 |
nothing calls this directly
no test coverage detected