GetArchiveFormatInfo

ArchiveInstanceInfo.GetArchiveFormatInfo method (1 of 2)

Gets archive format info.

public static ArchiveFormatInfo GetArchiveFormatInfo(string fileName)
ParameterTypeDescription
fileNameStringThe filename of the archive file.

Return Value

Information about archive format.

Exceptions

exceptioncondition
ArgumentNullExceptionfileName is null.
SecurityExceptionThe caller does not have the required permission to access.
ArgumentExceptionThe fileName is empty, contains only white spaces, or contains invalid characters.
UnauthorizedAccessExceptionAccess to file fileName is denied.
PathTooLongExceptionThe specified fileName exceeds 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.
NotSupportedExceptionFile at fileName contains a colon (:) in the middle of the string.
IOExceptionAn I/O error occurred while opening the file.

See Also


ArchiveInstanceInfo.GetArchiveFormatInfo method (2 of 2)

Gets archive format info.

public static ArchiveFormatInfo GetArchiveFormatInfo(Stream stream)
ParameterTypeDescription
streamStreamThe stream of the archive file.

Return Value

Information about archive format.

Exceptions

exceptioncondition
ArgumentNullExceptionstream is null.
ArgumentExceptionstream is not seekable.

See Also