GetFormatInfo

ArchiveFormatDetector.GetFormatInfo method (1 of 2)

Gets format info.

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

Return Value

Information about archive format or null if format was not detected.

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


ArchiveFormatDetector.GetFormatInfo method (2 of 2)

Gets format info.

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

Return Value

Information about archive format or null if format was not detected.

Exceptions

exceptioncondition
ArgumentNullExceptionstream is null.
ArgumentExceptionstream is not seekable.

See Also