Interface IArchive
Namespace: Aspose.Zip
Assembly: Aspose.Zip.dll (25.2.0)
This interface represents an archive.
public interface IArchive : IDisposable
Implements
Properties
FileEntries
Gets entries of Aspose.Zip.IArchiveFileEntry type constituting the archive.
IEnumerable<iarchivefileentry> FileEntries { get; }
Property Value
IEnumerable<IArchiveFileEntry>
Remarks
Archives for compression only, such as gzip, bzip2, lzip, lzma, xz, z consist of the single record - the archive itself.
Methods
ExtractToDirectory(string)
Extracts all the files in the archive to the directory provided.
void ExtractToDirectory(string destinationDirectory)
Parameters
destinationDirectory
string
The path to the directory to place the extracted files in.
Remarks
If the directory does not exist, it will be created.
Exceptions
destinationDirectory
is null.
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.
The caller does not have the required permission to access existing directory.
If directory does not exist, path contains a colon character (:) that is not part of a drive label (“C:").
destinationDirectory
is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the System.IO.Path.GetInvalidPathChars method. -or- path is prefixed with, or contains, only a colon character (:).
The directory specified by path is a file. -or- The network name is not known.