C# Класс ICSharpCode.SharpZipLib.Zip.ZipEntry

This class represents an entry in a zip archive. This can be a file or a directory ZipFile and ZipInputStream will give you instances of this class as information about the members in an archive. ZipOutputStream uses an instance of this class when creating an entry in a Zip file.

Author of the original java version : Jochen Hoenicke
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GetDateTime DateTime
HasDosAttributes bool
ProcessAESExtraData void
ProcessExtraData void
ZipEntry System
ZipEntry System
ZipEntry System

Открытые методы

Метод Описание
CleanName ( string name ) : string

Cleans a name making it conform to Zip file conventions. Devices names ('c:\') and UNC share names ('\\server\share') are removed and forward slashes ('\') are converted to back slashes ('/'). Names are made relative by trimming leading slashes which is compatible with the ZIP naming convention.

The Zip name transform class is more flexible.

Clone ( ) : object

Creates a copy of this zip entry.

ForceZip64 ( ) : void

Force this entry to be recorded using Zip64 extensions.

IsCompressionMethodSupported ( ) : bool

Test entry to see if data can be extracted.

IsCompressionMethodSupported ( CompressionMethod method ) : bool

Test a compression method to see if this library supports extracting data compressed with that method

IsZip64Forced ( ) : bool

Get a value indicating wether Zip64 extensions were forced.

ToString ( ) : string

Gets a string representation of this ZipEntry.

ZipEntry ( string name ) : System

Creates a zip entry with the given name.

Приватные методы

Метод Описание
GetDateTime ( ZipExtraData extraData ) : DateTime
HasDosAttributes ( int attributes ) : bool

Test the external attributes for this ZipEntry to see if the external attributes are Dos based (including WINNT and variants) and match the values

ProcessAESExtraData ( ZipExtraData extraData ) : void
ProcessExtraData ( bool localHeader ) : void

Process extra data fields updating the entry based on the contents.

ZipEntry ( ZipEntry entry ) : System
ZipEntry ( string name, int versionRequiredToExtract ) : System

Creates a zip entry with the given name and version required to extract

ZipEntry ( string name, int versionRequiredToExtract, int madeByInfo, CompressionMethod method ) : System

Initializes an entry with the given name and made by information

This constructor is used by the ZipFile class when reading from the central header It is not generally useful, use the constructor specifying the name only.

Описание методов

CleanName() публичный статический Метод

Cleans a name making it conform to Zip file conventions. Devices names ('c:\') and UNC share names ('\\server\share') are removed and forward slashes ('\') are converted to back slashes ('/'). Names are made relative by trimming leading slashes which is compatible with the ZIP naming convention.
The Zip name transform class is more flexible.
public static CleanName ( string name ) : string
name string The name to clean
Результат string

Clone() публичный Метод

Creates a copy of this zip entry.
public Clone ( ) : object
Результат object

ForceZip64() публичный Метод

Force this entry to be recorded using Zip64 extensions.
public ForceZip64 ( ) : void
Результат void

IsCompressionMethodSupported() публичный Метод

Test entry to see if data can be extracted.
public IsCompressionMethodSupported ( ) : bool
Результат bool

IsCompressionMethodSupported() публичный статический Метод

Test a compression method to see if this library supports extracting data compressed with that method
public static IsCompressionMethodSupported ( CompressionMethod method ) : bool
method CompressionMethod The compression method to test.
Результат bool

IsZip64Forced() публичный Метод

Get a value indicating wether Zip64 extensions were forced.
public IsZip64Forced ( ) : bool
Результат bool

ToString() публичный Метод

Gets a string representation of this ZipEntry.
public ToString ( ) : string
Результат string

ZipEntry() публичный Метод

Creates a zip entry with the given name.
/// The name passed is null ///
public ZipEntry ( string name ) : System
name string /// The name for this entry. Can include directory components. /// The convention for names is 'unix' style paths with relative names only. /// There are with no device names and path elements are separated by '/' characters. ///
Результат System