WimArchive.WimArchive
Contents
[
Hide
]WimArchive(Stream)
Initializes a new instance of the WimArchive
class and composes entries list can be extracted from the archive.
public WimArchive(Stream sourceStream)
Parameter | Type | Description |
---|---|---|
sourceStream | Stream | The source of the archive. It must be seekable. |
Exceptions
exception | condition |
---|---|
ArgumentNullException | sourceStream is null. |
ArgumentException | sourceStream is not seekable. |
InvalidDataException | sourceStream is not valid wim archive. |
Remarks
This constructor does not unpack any entry. See Open
method for unpacking.
Examples
The following example shows how to extract all of the entries to a directory.
using (var archive = new WimArchive(File.OpenRead("archive.wim")))
{
archive.Images[0].ExtractToDirectory("C:\\extracted");
}
See Also
- class WimArchive
- namespace Aspose.Zip.Wim
- assembly Aspose.Zip
WimArchive(string)
Initializes a new instance of the WimArchive
class and composes entries list can be extracted from the archive.
public WimArchive(string path)
Parameter | Type | Description |
---|---|---|
path | String | The path to the archive file. |
Exceptions
exception | condition |
---|---|
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. |
FileNotFoundException | The file is not found. |
DirectoryNotFoundException | The specified path is invalid, such as being on an unmapped drive. |
IOException | The file is already open. |
Remarks
This constructor does not unpack any entry. See Open
method for unpacking.
Examples
The following example shows how to extract all of the entries to a directory.
using (var archive = new WimArchive("archive.wim"))
{
archive.Images[0].ExtractToDirectory("C:\\extracted");
}
See Also
- class WimArchive
- namespace Aspose.Zip.Wim
- assembly Aspose.Zip