List the files inside the zip archive
(&self)
| 149 | |
| 150 | /// List the files inside the zip archive |
| 151 | pub fn list(&self) -> Result<Vec<String>> { |
| 152 | let zipfile = File::open(&self.path).into_diagnostic()?; |
| 153 | let mut archive = ZipArchive::new(zipfile).into_diagnostic()?; |
| 154 | |
| 155 | let mut files = Vec::new(); |
| 156 | for i in 0..archive.len() { |
| 157 | let entry = archive.by_index(i).into_diagnostic()?; |
| 158 | files.push(entry.name().to_string()); |
| 159 | } |
| 160 | |
| 161 | Ok(files) |
| 162 | } |
| 163 | |
| 164 | /// Get the architecture of the binary archive |
| 165 | pub fn architecture(&self) -> CpuArchitecture { |