Add an entry to the manifest.
(&mut self, entry: ArchiveEntry)
| 505 | |
| 506 | /// Add an entry to the manifest. |
| 507 | pub fn add(&mut self, entry: ArchiveEntry) { |
| 508 | if entry.is_directory { |
| 509 | self.directory_count += 1; |
| 510 | } else { |
| 511 | self.file_count += 1; |
| 512 | self.total_size += entry.size; |
| 513 | } |
| 514 | self.entries.push(entry); |
| 515 | } |
| 516 | |
| 517 | /// Get total entry count. |
| 518 | pub fn entry_count(&self) -> usize { |