(path: impl AsRef<Path>)
| 40 | unix_permissions: 0o644, |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | pub fn executable(mut self) -> Self { |
| 45 | self.unix_permissions = 0o755; |
| 46 | self |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | pub fn write_zip_file(path: impl AsRef<Path>, entries: &[ZipEntry]) -> io::Result<()> { |
| 51 | let file = fs::File::create(path)?; |
| 52 | let mut zip = zip::ZipWriter::new(file); |
| 53 | for entry in entries { |
| 54 | let options = zip::write::SimpleFileOptions::default() |
| 55 | .compression_method(zip::CompressionMethod::Deflated) |