Class ZipArchiveEntry
Represents a compressed file within a zip archive.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Zip
Assembly: Telerik.Windows.Zip.dll
Syntax
public class ZipArchiveEntry : IDisposable, INotifyPropertyChanged
Properties
Archive
The zip archive that the entry belongs to, or null if the entry has been deleted.
Declaration
public ZipArchive Archive { get; set; }
Property Value
ZipArchive
|
CompressedLength
Gets compressed size of the entry in the zip archive.
Declaration
public long CompressedLength { get; }
Property Value
System.Int64
|
ExternalAttributes
Gets or sets external file attributes.
Declaration
public int ExternalAttributes { get; set; }
Property Value
System.Int32
|
FullName
Gets the relative path of the entry in the zip archive.
Declaration
public string FullName { get; }
Property Value
System.String
|
LastWriteTime
Gets or sets the last time the entry in the zip archive was changed.
Declaration
public DateTimeOffset LastWriteTime { get; set; }
Property Value
System.DateTimeOffset
|
Length
Gets the uncompressed size of the entry in the zip archive.
Declaration
public long Length { get; }
Property Value
System.Int64
|
Name
Gets the file name of the entry in the zip archive.
Declaration
public string Name { get; }
Property Value
System.String
|
Methods
Delete()
Deletes the entry from the zip archive.
Declaration
public void Delete()
Exceptions
System.IO.IOException
The entry is already open for reading or writing. |
System.NotSupportedException
The zip archive for this entry was opened in a mode other than Update. |
System.ObjectDisposedException
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(Boolean)
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
System.Boolean
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
System.IO.Stream
The stream that represents the contents of the entry. |
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.
Exceptions
System.IO.IOException
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. |
System.NotSupportedException
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. |
System.ObjectDisposedException
The zip archive for this entry has been disposed. |
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler
|