Class XarDirectoryEntry
Namespace: Aspose.Zip.Xar
Assembly: Aspose.Zip.dll (25.2.0)
Represents directory entry within xar archive.
public sealed class XarDirectoryEntry : XarEntry
Inheritance
object ← XarEntry ← XarDirectoryEntry
Inherited Members
XarEntry.ToString(), XarEntry.Name, XarEntry.FullPath, XarEntry.IsDirectory, XarEntry.Parent, XarEntry.CreationTime, XarEntry.LastAccessTime, XarEntry.LastWriteTime, XarEntry.ModificationTime, 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.Xar.XarEntry type constituting the directory recursively.
public IEnumerable<xarentry> AllEntries { get; }
Property Value
IEnumerable<XarEntry>
Directories
Gets entries of Aspose.Zip.Xar.XarDirectoryEntry type constituting the directory.
public IEnumerable<xardirectoryentry> Directories { get; }
Property Value
IEnumerable<XarDirectoryEntry>
Files
Gets entries of Aspose.Zip.Xar.XarFileEntry type constituting the directory.
public IEnumerable<xarfileentry> Files { get; }
Property Value
FilesAndDirectories
Gets entries of Aspose.Zip.Xar.XarEntry type constituting the directory.
public IEnumerable<xarentry> FilesAndDirectories { get; }
Property Value
IEnumerable<XarEntry>
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 XarArchive("archive.xar"))
{
((XarDirectoryEntry)archive.Entries[0]).ExtractToDirectory("C:\\extracted");
}
Remarks
If the directory does not exist, it will be created.
Exceptions
path 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:").
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 (:).
The directory specified by path is a file. -or- The network name is not known.
Archive is corrupted.