Skip to content

Commit

Permalink
feat: Expose ZipArchive::central_directory_start (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
ok-nick authored Aug 11, 2024
1 parent 3f6768e commit af33ed3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,11 @@ impl<R: Read + Seek> ZipArchive<R> {
self.shared.files.len()
}

/// Get the starting offset of the zip central directory.
pub fn central_directory_start(&self) -> u64 {
self.shared.dir_start
}

/// Whether this zip archive contains no files
pub fn is_empty(&self) -> bool {
self.len() == 0
Expand Down

0 comments on commit af33ed3

Please sign in to comment.