Class WimImage

Class WimImage

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

Represents single image within wim archive.

public sealed class WimImage

Inheritance

objectWimImage

Inherited Members

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

Properties

AllEntries

Gets entries of Aspose.Zip.Wim.WimEntry type constituting the image recursively.

public IEnumerable<wimentry> AllEntries { get; }

Property Value

IEnumerable<WimEntry&gt;

Parent

Gets the archive the image belongs to.

public WimArchive Parent { get; }

Property Value

WimArchive

RootDirectory

Gets the root directory entry of the image.

public WimDirectoryEntry RootDirectory { get; }

Property Value

WimDirectoryEntry

Methods

ExtractToDirectory(string)

Extracts all the files in the image to the directory provided.

public void ExtractToDirectory(string destinationDirectory)

Parameters

destinationDirectory string

The path to the directory to place the extracted files in.

Examples

using (var archive = new WimArchive("install.wim")) 
{ 
   archive.Images[0].ExtractToDirectory("C:\\extracted");
}

Remarks

If the directory does not exist, it will be created.

Exceptions

ArgumentNullException

path is null

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.

SecurityException

The caller does not have the required permission to access existing directory.

NotSupportedException

If directory does not exist, path contains a colon character (:) that is not part of a drive label (“C:").

ArgumentException

path 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 (:).

IOException

The directory specified by path is a file. -or- The network name is not known.

InvalidDataException

Image is corrupted.

GetEntry(string)

Gets the entry of Aspose.Zip.Wim.WimEntry type for a given path.

public WimEntry GetEntry(string path)

Parameters

path string

The path of file or directory.

Returns

WimEntry

The entry of Aspose.Zip.Wim.WimEntry type.

 English