SevenZipPackage

Inheritance: java.lang.Object, com.groupdocs.metadata.core.MetadataPackage, com.groupdocs.metadata.core.CustomPackage

public final class SevenZipPackage extends CustomPackage

Represents ZIP archive metadata.


The following code snippet shows how to get metadata from a ZIP archive.
 
 Encoding encoding = Encoding.GetEncoding(866);
 using (Metadata metadata = new Metadata(Constants.InputSevenZip))
 {
     var root = metadata.GetRootPackage<SevenZipRootPackage>();
     Console.WriteLine(root.SevenZipPackage.TotalEntries);
     foreach (var file in root.SevenZipPackage.Files)
     {
         Console.WriteLine(file.Name);
         Console.WriteLine(file.CompressedSize);
         Console.WriteLine(file.ModificationDateTime);
         Console.WriteLine(file.UncompressedSize);
         // Use a specific encoding for the file names
         Console.WriteLine(encoding.GetString(file.RawName));
     }
 }

Learn more

Method Description
getFiles() Gets an array of ZipFile entries inside the ZIP archive.
getTotalEntries() Gets the total number of entries inside the ZIP archive.

getFiles()

public final SevenZipFile[] getFiles()

Gets an array of ZipFile entries inside the ZIP archive.

Value: An array of ZipFile entries inside the ZIP archive.

Returns: com.groupdocs.metadata.core.SevenZipFile[]

getTotalEntries()

public final long getTotalEntries()

Gets the total number of entries inside the ZIP archive.

Value: The total number of entries inside the ZIP archive.

Returns: long