Class ArchiveFormatDetector

Class ArchiveFormatDetector

Namespace: Aspose.Zip.ArchiveInfo
Assembly: Aspose.Zip.dll (25.2.0)

Detects archive format and provides other related information.

[Obsolete("Use static methods of ArchiveInstanceInfo class instead.")]
public sealed class ArchiveFormatDetector

Inheritance

objectArchiveFormatDetector

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

ArchiveFormatDetector()

Initializes a new instance of the Aspose.Zip.ArchiveInfo.ArchiveFormatDetector class.

[Obsolete("Use static methods of ArchiveInstanceInfo class instead.")]
public ArchiveFormatDetector()

Methods

GetFormatInfo(string)

Gets format info.

[Obsolete("Use static methods of ArchiveInstanceInfo class instead.")]
public ArchiveFormatInfo GetFormatInfo(string fileName)

Parameters

fileName string

The filename of the archive file.

Returns

ArchiveFormatInfo

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

Exceptions

ArgumentNullException

fileName is null.

SecurityException

The caller does not have the required permission to access.

ArgumentException

The fileName is empty, contains only white spaces, or contains invalid characters.

UnauthorizedAccessException

Access to file fileName is denied.

PathTooLongException

The 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.

NotSupportedException

File at fileName contains a colon (:) in the middle of the string.

IOException

An I/O error occurred while opening the file.

GetFormatInfo(Stream)

Gets format info.

[Obsolete("Use static methods of ArchiveInstanceInfo class instead.")]
public ArchiveFormatInfo GetFormatInfo(Stream stream)

Parameters

stream Stream

The stream of the archive file.

Returns

ArchiveFormatInfo

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

Exceptions

ArgumentNullException

stream is null.

ArgumentException

stream is not seekable.

 English