ZipArchive.CreateEntry Method (String)

Creates an empty entry in the Zip archive with the specified entry name.

There are no restrictions on the names of entries.

The last write time of the entry is set to the current time.

If an entry with the specified name already occurs in the archive, a second entry will be created that has the same name.

Since no CompressionLevel is specified, the default provided by the implementation of the underlying compression algorithm will be used; the ZipArchive will not impose its own default.

Currently, the underlying compression algorithm is provided by the System.IO.Compression.DeflateStreamclass.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

public ZipArchiveEntry CreateEntry(
	string entryName


Type: System.String

A path relative to the root of the archive that indicates the name of the entry to be created.

Return Value

Type: Microsoft.TeamFoundation.Framework.Server.ZipArchiveEntry
A wrapper for the newly created file entry in the archive.


entryName is a zero-length string.


entryName is null.


The ZipArchive does not support writing.


The ZipArchive has already been closed.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft