GetNextEntry Method

DotNetZip

Ionic Zip Library v1.9.1.6 GetNextEntry Method
ReferenceIonic.ZipZipInputStreamGetNextEntry()()()()
Read the next entry from the zip file.
Declaration Syntax
C# Visual Basic Visual C++
public ZipEntry GetNextEntry()
Public Function GetNextEntry As ZipEntry
public:
ZipEntry^ GetNextEntry()
Return Value
The ZipEntry read. Returns null (or Nothing in VB) if there are no more entries in the zip file.
Remarks

Call this method just before calling Read(array<Byte>[]()[][], Int32, Int32), to position the pointer in the zip file to the next entry that can be read. Subsequent calls to Read(), will decrypt and decompress the data in the zip file, until Read() returns 0.

Each time you call GetNextEntry(), the pointer in the wrapped stream is moved to the next entry in the zip file. If you call Seek(Int64, SeekOrigin), and thus re-position the pointer within the file, you will need to call GetNextEntry() again, to insure that the file pointer is positioned at the beginning of a zip entry.

This method returns the ZipEntry. Using a stream approach, you will read the raw bytes for an entry in a zip file via calls to Read(). Alternatively, you can extract an entry into a file, or a stream, by calling Extract()()()(), or one of its siblings.

Assembly: Ionic.Zip (Module: Ionic.Zip) Version: 1.9.1.8 (1.9.1.8)