ClassZipArchiveEntry
Represents a compressed file within a zip archive.
Definition
Namespace:Telerik.Windows.Zip
Assembly:Telerik.Windows.Zip.dll
Syntax:
public class ZipArchiveEntry : IDisposable, INotifyPropertyChanged
Inheritance: objectZipArchiveEntry
Implements:
Properties
Archive
The zip archive that the entry belongs to, or null if the entry has been deleted.
CompressedLength
Gets compressed size of the entry in the zip archive.
ExternalAttributes
Gets or sets external file attributes.
FullName
Gets the relative path of the entry in the zip archive.
LastWriteTime
Gets or sets the last time the entry in the zip archive was changed.
Declaration
public DateTimeOffset LastWriteTime { get; set; }
Property Value
Length
Gets the uncompressed size of the entry in the zip archive.
Methods
Delete()
Deletes the entry from the zip archive.
Declaration
public void Delete()
Exceptions
The entry is already open for reading or writing.
The zip archive for this entry was opened in a mode other than Update.
The zip archive for this entry has been disposed.
Dispose()
Releases the resources used by the current instance of the ZipArchiveEntry class.
Declaration
public void Dispose()
Implements
Dispose(bool)
Called by the Dispose() and Finalize() methods to release the unmanaged resources used by the current instance of the ZipArchive class, and optionally finishes writing the archive and releases the managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
disposing
True to finish writing the archive and release unmanaged and managed resources; false to release only unmanaged resources.
Open()
Opens the entry from the zip archive.
Declaration
public Stream Open()
Returns
The stream that represents the contents of the entry.
Exceptions
The entry is already currently open for writing. -or- The entry has been deleted from the archive. -or- The archive for this entry was opened with the Create mode, and this entry has already been written to.
The entry is either missing from the archive or is corrupt and cannot be read. -or- The entry has been compressed by using a compression method that is not supported.
The zip archive for this entry has been disposed.
Remarks
The resulting stream depends on the zip archive mode. If zip archive mode is Create then read-only stream without seeking support is returned (CompressedStream). If zip archive mode is Read then write-only stream without seeking support is returned (CompressedStream). If zip archive mode is Update then read/write stream which supports seeking is returned.
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Value
Implements