(path: P)
| 35 | } |
| 36 | |
| 37 | pub fn exists<P: ResPathSource>(path: P) -> bool { |
| 38 | let path = path.as_res_path_str(); |
| 39 | if validate_virtual_asset_path(path).is_err() { |
| 40 | return false; |
| 41 | } |
| 42 | match perro_io::resolve_path(path) { |
| 43 | perro_io::ResolvedPath::Excluded(_) => false, |
| 44 | perro_io::ResolvedPath::Disk(pb) => pb.exists(), |
| 45 | perro_io::ResolvedPath::WebUserStorage(_) |
| 46 | | perro_io::ResolvedPath::PerroAssets(_) |
| 47 | | perro_io::ResolvedPath::StaticBinary(_) |
| 48 | | perro_io::ResolvedPath::DlcStaticBinary { .. } |
| 49 | | perro_io::ResolvedPath::DlcPerroAssets { .. } => load_asset(path).is_ok(), |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | pub fn is_dir<P: ResPathSource>(path: P) -> bool { |
nothing calls this directly
no test coverage detected