The ZipArchive type exposes the following members.

Constructors

  NameDescription
Public methodSupported by the .NET Compact FrameworkZipArchive(Stream)
Initializes a ZipArchive object with the specified ZIP archive stream.
Public methodSupported by the .NET Compact FrameworkZipArchive(String)
Initializes a ZipArchive object with the specified ZIP archive.
Public methodSupported by the .NET Compact FrameworkZipArchive(Stream, ArchiveStreamCloseMode)
Initializes a ZipArchive object with the specified ZIP archive stream.
Public methodSupported by the .NET Compact FrameworkZipArchive(Stream, Boolean) Obsolete.
Public methodSupported by the .NET Compact FrameworkZipArchive(String, ArchiveOpenMode)
Initializes a ZipArchive object with the specified ZIP archive.
Public methodSupported by the .NET Compact FrameworkZipArchive(String, ArchiveOpenMode, ArchiveAccessMode)
Initializes a ZipArchive object with the specified ZIP file.

Methods

  NameDescription
Public methodSupported by the .NET Compact FrameworkAdd(String)
Adds specified local files or directories to the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAdd(FileSet) Obsolete.
Public methodSupported by the .NET Compact FrameworkAdd(FileSet)
Adds specified local files or directories to the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAdd(String, String)
Adds specified local files or directories to a directory within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAdd(FileSet, String) Obsolete.
Public methodSupported by the .NET Compact FrameworkAdd(FileSet, String)
Adds specified local files or directories to a directory within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAdd(String, String, TraversalMode)
Adds specified local files or directories to a directory within the ZIP archive.
Public methodStatic memberSupported by the .NET Compact FrameworkAdd(String, String, String)
Adds specified local files or directories to a directory within the specified ZIP archive.
Public methodSupported by the .NET Compact FrameworkAdd(FileSet, String, ArchiveActionOnExistingFile) Obsolete.
Public methodSupported by the .NET Compact FrameworkAdd(String, String, ArchiveTraversalMode, ArchiveActionOnExistingFile) Obsolete.
Public methodSupported by the .NET Compact FrameworkAdd(FileSet, String, TransferMethod, ActionOnExistingFiles)
Adds specified local files or directories to a directory within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAdd(String, String, TraversalMode, TransferMethod, ActionOnExistingFiles)
Adds specified local files or directories to a directory within the ZIP archive.
Public methodStatic memberSupported by the .NET Compact FrameworkAdd(String, String, String, ArchiveTraversalMode, ArchiveActionOnExistingFile) Obsolete.
Public methodStatic memberSupported by the .NET Compact FrameworkAdd(String, String, String, TraversalMode, TransferMethod, ActionOnExistingFiles)
Adds specified local files or directories to a directory within the specified ZIP archive.
Public methodSupported by the .NET Compact FrameworkAddAsync(FileSet, String, ArchiveActionOnExistingFile) Obsolete.
Public methodSupported by the .NET Compact FrameworkAddAsync(String, String, ArchiveTraversalMode, ArchiveActionOnExistingFile) Obsolete.
Public methodSupported by the .NET Compact FrameworkAddAsync(FileSet, String, TransferMethod, ActionOnExistingFiles)
Begins asynchronous Add operation. Adds specified local files or directories to a directory within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAddAsync(String, String, TraversalMode, TransferMethod, ActionOnExistingFiles)
Begins asynchronous Add operation. Adds specified local files or directories to a directory within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAddFile(String)
Adds the specified file to the root directory of the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAddFile(Stream, String)
Adds data from the specified stream to the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAddFile(String, String)
Adds the specified local file to the specified directory within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAddFile(Stream, String, ActionOnExistingFiles)
Adds data from the specified stream to the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAddFile(String, String, ActionOnExistingFiles)
Adds the specified local file to the specified directory within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAddFileAsync(Stream, String)
Begins asynchronous AddFile operation. Adds data from the specified stream to the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAddFileAsync(String, String)
Begins asynchronous AddFile operation. Adds the specified local file to the specified directory within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAddFileAsync(Stream, String, ActionOnExistingFiles)
Begins asynchronous AddFile operation. Adds data from the specified stream to the ZIP archive.
Public methodSupported by the .NET Compact FrameworkAddFileAsync(String, String, ActionOnExistingFiles)
Begins asynchronous AddFile operation. Adds the specified local file to the specified directory within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkCancel
Requests the currently processing operation to be canceled as soon as possible.
Public methodSupported by the .NET Compact FrameworkClose()()()()
Closes the current ZipArchive object and releases any resources associated with it (file or stream). This is the same as calling Close(ArchiveSaveAction) with Auto argument.
Public methodSupported by the .NET Compact FrameworkClose(ArchiveSaveAction)
Closes the current ZipArchive object and releases any resources associated with it (file or stream).
Public methodSupported by the .NET Compact FrameworkCreateDirectory(String)
Creates a directory within the ZIP archive.
Public methodStatic memberSupported by the .NET Compact FrameworkCreateDirectory(String, String)
Creates new empty directory within the specified ZIP archive.
Public methodStatic memberSupported by the .NET Compact FrameworkDecrypt
Decrypts an existing ZIP archive to the specified zip archive.
Public methodSupported by the .NET Compact FrameworkDelete(String)
Deletes files and/or empty directories within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkDelete(FileSet) Obsolete.
Public methodSupported by the .NET Compact FrameworkDelete(FileSet)
Deletes files and/or directories within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkDelete(String, ArchiveSaveAction) Obsolete.
Public methodSupported by the .NET Compact FrameworkDelete(String, ArchiveTraversalMode) Obsolete.
Public methodSupported by the .NET Compact FrameworkDelete(String, TraversalMode)
Deletes files and/or directories within the ZIP archive.
Public methodStatic memberSupported by the .NET Compact FrameworkDelete(String, String)
Deletes files and/or empty directories from the specified ZIP archive.
Public methodSupported by the .NET Compact FrameworkDelete(FileSet, ArchiveSaveAction) Obsolete.
Public methodSupported by the .NET Compact FrameworkDelete(FileSet, ArchiveSaveAction)
Deletes files and/or directories within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkDelete(String, ArchiveTraversalMode, ArchiveSaveAction) Obsolete.
Public methodSupported by the .NET Compact FrameworkDelete(String, TraversalMode, ArchiveSaveAction)
Deletes files and/or directories within the ZIP archive.
Public methodStatic memberSupported by the .NET Compact FrameworkDelete(String, String, ArchiveSaveAction)
Deletes files and/or empty directories from the specified ZIP archive.
Public methodStatic memberSupported by the .NET Compact FrameworkDelete(String, String, ArchiveTraversalMode) Obsolete.
Public methodStatic memberSupported by the .NET Compact FrameworkDelete(String, String, TraversalMode)
Deletes files and/or directories from the specified ZIP archive.
Public methodStatic memberSupported by the .NET Compact FrameworkDelete(String, String, ArchiveTraversalMode, ArchiveSaveAction) Obsolete.
Public methodStatic memberSupported by the .NET Compact FrameworkDelete(String, String, TraversalMode, ArchiveSaveAction)
Deletes files and/or directories from the specified ZIP archive.
Public methodSupported by the .NET Compact FrameworkDeleteAsync(FileSet, ArchiveSaveAction) Obsolete.
Public methodSupported by the .NET Compact FrameworkDeleteAsync(FileSet, ArchiveSaveAction)
Begins asynchronous Delete operation. Deletes files and/or directories within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkDeleteAsync(String, ArchiveTraversalMode, ArchiveSaveAction) Obsolete.
Public methodSupported by the .NET Compact FrameworkDeleteAsync(String, TraversalMode, ArchiveSaveAction)
Begins asynchronous Delete operation. Deletes files and/or directories within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkDeleteFile(String)
Deletes a file within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkDeleteFile(String, ArchiveSaveAction)
Deletes a file within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkDeleteFileAsync
Begins asynchronous DeleteFile operation. Deletes a file within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkDirectoryExists
Gets a value indicating whether the specified directory is present in the ZIP archive.
Protected methodSupported by the .NET Compact FrameworkDispose
Releases the unmanaged resources used by the ZipArchive and optionally releases the managed resources.
Public methodStatic memberSupported by the .NET Compact FrameworkEncrypt
Encrypts an existing ZIP archive to the specified file.
Public methodSupported by the .NET Compact FrameworkEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodSupported by the .NET Compact FrameworkExtract(String, String)
Extracts specified archive item(s) into the specified local directory.
Public methodSupported by the .NET Compact FrameworkExtract(FileSet, String) Obsolete.
Public methodSupported by the .NET Compact FrameworkExtract(FileSet, String)
Extracts specified archive item(s) into the specified local directory.
Public methodSupported by the .NET Compact FrameworkExtract(String, String, TraversalMode)
Extracts specified archive item(s) into the specified local directory.
Public methodStatic memberSupported by the .NET Compact FrameworkExtract(String, String, String)
Extracts specified archive item(s) from the specified ZIP archive into the specified local directory.
Public methodSupported by the .NET Compact FrameworkExtract(FileSet, String, ArchiveActionOnExistingFile) Obsolete.
Public methodSupported by the .NET Compact FrameworkExtract(String, String, ArchiveTraversalMode, ArchiveActionOnExistingFile) Obsolete.
Public methodSupported by the .NET Compact FrameworkExtract(FileSet, String, TransferMethod, ActionOnExistingFiles)
Extracts specified archive item(s) into the specified local directory.
Public methodSupported by the .NET Compact FrameworkExtract(String, String, TraversalMode, TransferMethod, ActionOnExistingFiles)
Extracts specified archive item(s) into the specified local directory.
Public methodStatic memberSupported by the .NET Compact FrameworkExtract(String, String, String, ArchiveTraversalMode, ArchiveActionOnExistingFile) Obsolete.
Public methodStatic memberSupported by the .NET Compact FrameworkExtract(String, String, String, TraversalMode, TransferMethod, ActionOnExistingFiles)
Extracts specified archive item(s) from the specified ZIP archive into the specified local directory.
Public methodSupported by the .NET Compact FrameworkExtractAll(String)
Extracts the whole content of the ZIP archive into the specified local directory.
Public methodSupported by the .NET Compact FrameworkExtractAll(String, ActionOnExistingFiles)
Extracts the whole content of the ZIP archive into the specified local directory.
Public methodSupported by the .NET Compact FrameworkExtractAll(String, ArchiveActionOnExistingFile) Obsolete.
Public methodStatic memberSupported by the .NET Compact FrameworkExtractAll(String, String)
Extracts the whole content of the specified ZIP archive into the specified local directory.
Public methodSupported by the .NET Compact FrameworkExtractAll(String, TransferMethod, ActionOnExistingFiles)
Extracts the whole content of the ZIP archive into the specified local directory.
Public methodStatic memberSupported by the .NET Compact FrameworkExtractAll(String, String, ArchiveActionOnExistingFile) Obsolete.
Public methodStatic memberSupported by the .NET Compact FrameworkExtractAll(String, String, TransferMethod, ActionOnExistingFiles)
Extracts the whole content of the specified ZIP archive into the specified local directory.
Public methodSupported by the .NET Compact FrameworkExtractAsync(FileSet, String, ArchiveActionOnExistingFile) Obsolete.
Public methodSupported by the .NET Compact FrameworkExtractAsync(String, String, ArchiveTraversalMode, ArchiveActionOnExistingFile) Obsolete.
Public methodSupported by the .NET Compact FrameworkExtractAsync(FileSet, String, TransferMethod, ActionOnExistingFiles)
Begins asynchronous Extract operation. Extracts specified archive item(s) into the specified local directory.
Public methodSupported by the .NET Compact FrameworkExtractAsync(String, String, TraversalMode, TransferMethod, ActionOnExistingFiles)
Begins asynchronous Extract operation. Extracts specified archive item(s) into the specified local directory.
Public methodSupported by the .NET Compact FrameworkExtractFile(String, Stream)
Extracts the specified archive file item into a stream.
Public methodSupported by the .NET Compact FrameworkExtractFile(String, String)
Extracts the specified archive file item into a local file.
Public methodSupported by the .NET Compact FrameworkExtractFile(String, String, ActionOnExistingFiles)
Extracts the specified archive file item into a local file.
Public methodSupported by the .NET Compact FrameworkExtractFileAsync(String, Stream)
Begins asynchronous ExtractFile operation. Extracts the specified archive file item into a stream.
Public methodSupported by the .NET Compact FrameworkExtractFileAsync(String, String)
Begins asynchronous ExtractFile operation. Extracts the specified archive file item into a local file.
Public methodSupported by the .NET Compact FrameworkExtractFileAsync(String, String, ActionOnExistingFiles)
Begins asynchronous ExtractFile operation. Extracts the specified archive file item into a local file.
Public methodSupported by the .NET Compact FrameworkFileExists
Gets a value indicating whether the specified file is present in the ZIP archive.
Protected methodSupported by the .NET Compact FrameworkFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodSupported by the .NET Compact FrameworkGetEnumerator
Returns an enumerator that iterates through the collection.
Public methodSupported by the .NET Compact FrameworkGetHashCode
Serves as a hash function for a particular type. GetHashCode()()()() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
Public methodSupported by the .NET Compact FrameworkGetItem
Gets the ZipItem object that represents the specified path.
Public methodSupported by the .NET Compact FrameworkGetItems()()()()
Gets the collection of all archive items stored within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkGetItems(FileSet)
Gets the collection of archive items stored within the ZIP archive matching the specified set.
Public methodSupported by the .NET Compact FrameworkGetItems(String, ArchiveTraversalMode) Obsolete.
Public methodSupported by the .NET Compact FrameworkGetItems(String, TraversalMode)
Gets the collection of archive items stored within the ZIP archive matching the specified path or mask using the specified traversal mode.
Public methodSupported by the .NET Compact FrameworkGetItems(FileSet, ArchiveItemTypes)
Gets the collection of archive items stored within the ZIP archive matching the specified set.
Public methodSupported by the .NET Compact FrameworkGetItems(String, ArchiveTraversalMode, ArchiveItemTypes) Obsolete.
Public methodSupported by the .NET Compact FrameworkGetItems(String, TraversalMode, ArchiveItemTypes)
Gets the collection of archive items stored within the ZIP archive matching the specified path or mask and type using the specified traversal mode.
Public methodSupported by the .NET Compact FrameworkGetItemsAsync()()()()
Begins asynchronous GetItems operation. Gets the collection of all archive items stored within the ZIP archive.
Public methodSupported by the .NET Compact FrameworkGetItemsAsync(FileSet, ArchiveItemTypes)
Begins asynchronous GetItems operation. Gets the collection of archive items stored within the ZIP archive matching the specified set.
Public methodSupported by the .NET Compact FrameworkGetItemsAsync(String, ArchiveTraversalMode, ArchiveItemTypes) Obsolete.
Public methodSupported by the .NET Compact FrameworkGetItemsAsync(String, TraversalMode, ArchiveItemTypes)
Begins asynchronous GetItems operation. Gets the collection of archive items stored within the ZIP archive matching the specified path or mask and type using the specified traversal mode.
Public methodSupported by the .NET Compact FrameworkGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodSupported by the .NET Compact FrameworkMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSupported by the .NET Compact FrameworkMove(String, String)
Moves or renames an archive item (file or directory).
Public methodStatic memberSupported by the .NET Compact FrameworkMove(String, String, String)
Moves (renames) an archive item (file or directory) within the specified ZIP archive.
Public methodSupported by the .NET Compact FrameworkMoveAsync
Begins asynchronous Move operation. Moves or renames an archive item (file or directory).
Public methodSupported by the .NET Compact FrameworkSave()()()()
Saves pending changes into the ZIP archive and flushes the underlying stream.
Public methodSupported by the .NET Compact FrameworkSave(ArchiveSaveAction)
Saves pending changes into the ZIP archive and flushes the underlying stream.
Public methodSupported by the .NET Compact FrameworkSaveAsync
Begins asynchronous Save operation. Saves pending changes into the ZIP archive and flushes the underlying stream.
Public methodSupported by the .NET Compact FrameworkToString
Returns a String that represents the current Object.
(Inherited from Object.)

Properties

  NameDescription
Public propertySupported by the .NET Compact FrameworkComment
Gets or sets the comment for the whole ZIP archive.
Public propertySupported by the .NET Compact FrameworkCompressionLevel
Gets or sets the compression level to be used by Add(String) and AddFile(String) methods. Possible values are 0-9, where 0 means no compression (fastest) and 9 means best compression (slowest). 6 (medium compression and speed) is a default value.
Public propertySupported by the .NET Compact FrameworkCompressionMethod
Gets or sets the compression method to be used by Add(String) and AddFile(String) methods.
Public propertyStatic memberSupported by the .NET Compact FrameworkDefaultLogWriter
Gets or sets a default log writer used by all new instances of ZipArchive object.
Public propertySupported by the .NET Compact FrameworkEncryptionAlgorithm
Gets or sets the encryption algorithm to be used by Add(String) and AddFile(String) methods.
Public propertySupported by the .NET Compact FrameworkFilePath
Gets an absolute path to the ZIP archive file or a null reference (Nothing in Visual Basic) if the path is not available.
Public propertyStatic memberSupported by the .NET Compact FrameworkForceManagedAes Obsolete.
Public propertySupported by the .NET Compact FrameworkIsBusy
Gets a value indicating whether there is any asynchronous operation on the current object in progress.
Public propertySupported by the .NET Compact FrameworkIsDisposed
Gets a value indicating whether the ZipArchive object is disposed.
Public propertySupported by the .NET Compact FrameworkIsReadOnly
Gets a value indicating whether the ZIP archive is only open for reading.
Public propertySupported by the .NET Compact FrameworkItem
Gets the ZipItem object that represents the specified path.
Public propertySupported by the .NET Compact FrameworkLogWriter
Gets or sets the logger used by this object.
Public propertySupported by the .NET Compact FrameworkOptions
Gets the archive options object.
Public propertySupported by the .NET Compact FrameworkPassword
Gets or sets a password. Null reference (Nothing in Visual Basic) means don't encrypt newly added files.
Public propertySupported by the .NET Compact FrameworkSaveMode
Gets or sets a save mode, which determines when changes are saved to the underlying stream.

Events

  NameDescription
Public eventSupported by the .NET Compact FrameworkAddCompleted
Occurs when the asynchronous call of the AddAsync or the AddFileAsync method is completed (or canceled or raised an exception).
Public eventSupported by the .NET Compact FrameworkDeleteCompleted
Occurs when the asynchronous call of the DeleteAsync method is completed (or canceled or raised an exception).
Public eventSupported by the .NET Compact FrameworkExtractCompleted
Occurs when the asynchronous call of the ExtractAsync or the ExtractFileAsync method is completed (or canceled or raised an exception).
Public eventSupported by the .NET Compact FrameworkGetItemsCompleted
Occurs when the asynchronous call of the GetItemsAsync method is completed (or canceled or raised an exception).
Public eventSupported by the .NET Compact FrameworkMoveCompleted
Occurs when the asynchronous call of the MoveAsync method is completed (or canceled or raised an exception).
Public eventSupported by the .NET Compact FrameworkPasswordRequired
Occurs when a password is needed for decompressing an item.
Public eventSupported by the .NET Compact FrameworkProblemDetected
Occurs when a problem is detected in Add, Extract, Delete or GetItems methods, making it possible for the handler to choose a desired action.
Public eventSupported by the .NET Compact FrameworkProgressChanged
Occurs when a significant action occurs in Add, Extract, Delete, GetItems methods.
Public eventSupported by the .NET Compact FrameworkSaveCompleted
Occurs when the asynchronous call of the SaveAsync method is completed (or canceled or raised an exception).
Public eventSupported by the .NET Compact FrameworkShrinkProgress
Occurs when a data block is processed while shrinking the archive.

Explicit Interface Implementations

See Also