MCPcopy Index your code
hub / github.com/cargo-lambda/cargo-lambda / list

Method list

crates/cargo-lambda-build/src/archive.rs:151–162  ·  view source on GitHub ↗

List the files inside the zip archive

(&self)

Source from the content-addressed store, hash-verified

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 {

Callers 2

newMethod · 0.80

Calls 2

newFunction · 0.85
pushMethod · 0.80

Tested by 1