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)
Syntax
'Declaration
Public Function GetEntry ( _
entryName As String _
) As ZipArchiveEntry
public ZipArchiveEntry GetEntry(
string entryName
)
public:
ZipArchiveEntry^ GetEntry(
String^ entryName
)
member GetEntry :
entryName:string -> ZipArchiveEntry
public function GetEntry(
entryName : String
) : ZipArchiveEntry
Parameters
entryName
Type: System.StringA 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.
Exceptions
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. |
.NET Framework Security
- 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.