Interface IArchiveFileEntry

Interface IArchiveFileEntry

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

This interface represents an archive file entry.

public interface IArchiveFileEntry

Properties

Length

Gets the length of the entry in bytes.

long? Length { get; }

Property Value

long?

Name

Gets name of the entry.

string Name { get; }

Property Value

string

Remarks

Archives for compression only, such as gzip, bzip2, lzip, lzma, xz, z has name “File.bin” unless another name can be found in headers.

Methods

Extract(string)

Extracts the entry to the filesystem by the path provided.

FileInfo Extract(string path)

Parameters

path string

The path to destination file. If the file already exists, it will be overwritten.

Returns

FileInfo

System.IO.FileInfo instance containing extracted data.

Exceptions

ArgumentNullException

path is null.

SecurityException

The caller does not have the required permission to access.

ArgumentException

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

UnauthorizedAccessException

Access to file path is denied.

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.

NotSupportedException

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

Extract(Stream)

Extracts the entry to the stream provided.

void Extract(Stream destination)

Parameters

destination Stream

Destination stream. Must be writable.

Exceptions

ArgumentException

destination does not support writing.

 English