ZipArchive Constructor (String)

Opens a ZipArchive on the specified path for reading. The specified file is opened by using FileMode.Open.

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

public ZipArchive(
	string archiveFileName
)

Parameters

archiveFileName
Type: System.String

A string specifying the path on the file system to open the archive on. The path is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory.

ExceptionCondition
ArgumentException

path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.

ArgumentNullException

path is null.

PathTooLongException

The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.

DirectoryNotFoundException

The specified path is invalid; for example, if it is on an unmapped drive.

IOException

An I/O error occurred while it is opening the file.

UnauthorizedAccessException

path specified a directory, or the caller does not have the required permission.

FileNotFoundException

The file specified in path was not found.

NotSupportedException

path is in an invalid format.

InvalidDataException

The specified file could not be interpreted as a Zip file.

Show: