ZipArchive.GetEntry Method

Retrieves a wrapper for the file entry in the archive with the specified name. Names are compared using ordinal comparison. If there are multiple entries in the archive with the specified name, the first found will be returned.

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

public ZipArchiveEntry GetEntry(
	string entryName
)

Parameters

entryName
Type: System.String

A path relative to the root of the archive, identifying the desired entry.

Return Value

Type: Microsoft.TeamFoundation.Framework.Server.ZipArchiveEntry
A wrapper for the file entry in the archive. If no entry in the archive exists with the specified name, null will be returned.

ExceptionCondition
ArgumentException

entryName is a zero-length string.

ArgumentNullException

entryName is null.

NotSupportedException

The ZipArchive does not support reading.

ObjectDisposedException

The ZipArchive has already been closed.

InvalidDataException

The Zip archive is corrupted and the entries cannot be retrieved.

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