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)
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.ZipArchiveEntryA wrapper for the file entry in the archive. If no entry in the archive exists with the specified name, null will be returned.
| Exception | Condition |
|---|---|
| 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. |
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.