Class WimDirectoryEntry

Class WimDirectoryEntry

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

Represents single directory within wim archive.

public sealed class WimDirectoryEntry : WimEntry

Inheritance

objectWimEntryWimDirectoryEntry

Inherited Members

WimEntry.ToString(), WimEntry.Archive, WimEntry.Image, WimEntry.Parent, WimEntry.Name, WimEntry.ShortName, WimEntry.FullPath, WimEntry.ChangeTime, WimEntry.CreationTime, WimEntry.LastAccessTime, WimEntry.LastWriteTime, WimEntry.ModificationTime, WimEntry.FileAttributes, WimEntry.AlternateDataStreams, WimEntry.HardLink, WimEntry.HasHardLinks, WimEntry.IsDirectory, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties

AllEntries

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

public IEnumerable<wimentry> AllEntries { get; }

Property Value

IEnumerable<WimEntry&gt;

Directories

Gets entries of Aspose.Zip.Wim.WimDirectoryEntry type constituting the directory.

public ReadOnlyCollection<wimdirectoryentry> Directories { get; }

Property Value

ReadOnlyCollection<WimDirectoryEntry&gt;

Files

Gets entries of Aspose.Zip.Wim.WimFileEntry type constituting the directory.

public ReadOnlyCollection<wimfileentry> Files { get; }

Property Value

ReadOnlyCollection<WimFileEntry&gt;

FilesAndDirectories

Gets entries of Aspose.Zip.Wim.WimEntry type constituting the directory.

public IEnumerable<wimentry> FilesAndDirectories { get; }

Property Value

IEnumerable<WimEntry&gt;

Methods

ExtractToDirectory(string)

Extracts all the files in the current directory 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("archive.wim")) 
{ 
   archive.Images[0].RootDirectory.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

Archive is corrupted.

 English