Class ArchiveFormatDetector

Class ArchiveFormatDetector

名称: Aspose.Zip.ArchiveInfo 收藏: Aspose.Zip.dll (25.5.0)

检测到档案格式,并提供其他相关信息。

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

Inheritance

object ArchiveFormatDetector

继承人

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

Constructors

ArchiveFormatDetector()

启动了 Aspose.Zip.ArchiveInfo.ArchiveFormatDetector 类的新例子。

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

Methods

GetFormatInfo(线条)

获取信息格式

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

Parameters

fileName string

文件档案的名称。

Returns

ArchiveFormatInfo

存档格式或零格式的信息,如果格式未被检测到。

Exceptions

ArgumentNullException

fileName’ is null.

SecurityException

召唤者没有所需的访问许可。

ArgumentException

fileName’ 是空的,只包含白色空间,或包含无效的字符。

UnauthorizedAccessException

拒绝访问 fileName’ 文件。

PathTooLongException

指定的 fileName’ 超过系统定义的最大长度. 例如,在基于 Windows 的平台上,路径必须小于 248 个字符,文件名必须小于 260 个字符。

NotSupportedException

文件在 fileName’ 中间包含一个列(:)。

IOException

在打开文件时出现了 I/O 错误。

GetFormatInfo(Stream)

获取信息格式

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

Parameters

stream Stream

存档文件的流程。

Returns

ArchiveFormatInfo

存档格式或零格式的信息,如果格式未被检测到。

Exceptions

ArgumentNullException

stream’ is null.

ArgumentException

stream’ is not seekable.

 中文