(path: P)
| 66 | matches!(perro_io::resolve_path(path), perro_io::ResolvedPath::Disk(pb) if pb.is_file()) |
| 67 | } |
| 68 | |
| 69 | pub fn read_dir<P: ResPathSource>(path: P) -> io::Result<Vec<String>> { |
| 70 | let path = path.as_res_path_str(); |
| 71 | let root = disk_path(path)?; |
| 72 | let mut out = Vec::new(); |
| 73 | for entry in fs::read_dir(root)? { |
| 74 | out.push(entry?.path().to_string_lossy().to_string()); |
| 75 | } |
| 76 | out.sort(); |
| 77 | Ok(out) |
| 78 | } |
| 79 | |
| 80 | pub fn walk_dir<P: ResPathSource>(path: P) -> io::Result<Vec<String>> { |