WimImage

Inheritance: java.lang.Object

public final class WimImage

Represents a single image within wim archive.

Methods

MethodDescription
extractToDirectory(String destinationDirectory)Extracts all the files in the image to the directory provided.
getAllEntries()Gets entries of WimEntry type constituting the image recursively.
getEntry(String path)Gets the entry of WimEntry type for a given path.
getParent()Gets the archive the image belongs to.
getRootDirectory()Gets the root directory entry of the image.

extractToDirectory(String destinationDirectory)

public final void extractToDirectory(String destinationDirectory)

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

 try (WimArchive archive = new WimArchive("install.wim")) {
     archive.getImages().get_Item(0).extractToDirectory("C:\\extracted");
 }



**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| destinationDirectory | java.lang.String | the path to the directory to place the extracted files in.

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

### getAllEntries() {#getAllEntries--}

public final Iterable getAllEntries()



Gets entries of [WimEntry](../../com.aspose.zip/wimentry) type constituting the image recursively.

**Returns:**
java.lang.Iterable<com.aspose.zip.WimEntry> - entries of [WimEntry](../../com.aspose.zip/wimentry) type constituting the image recursively
### getEntry(String path) {#getEntry-java.lang.String-}

public final WimEntry getEntry(String path)



Gets the entry of [WimEntry](../../com.aspose.zip/wimentry) type for a given path.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| path | java.lang.String | the path of file or directory |

**Returns:**
[WimEntry](../../com.aspose.zip/wimentry) - the entry of [WimEntry](../../com.aspose.zip/wimentry) type
### getParent() {#getParent--}

public final WimArchive getParent()



Gets the archive the image belongs to.

**Returns:**
[WimArchive](../../com.aspose.zip/wimarchive) - the archive the image belongs to
### getRootDirectory() {#getRootDirectory--}

public final WimDirectoryEntry getRootDirectory()



Gets the root directory entry of the image.

**Returns:**
[WimDirectoryEntry](../../com.aspose.zip/wimdirectoryentry) - the root directory entry of the image