XarDirectoryEntry
Inheritance: java.lang.Object, com.aspose.zip.XarEntry
public final class XarDirectoryEntry extends XarEntry
Represents directory entry within xar archive.
Methods
Method | Description |
---|---|
extractToDirectory(String destinationDirectory) | Extracts all the files in the current directory to the directory provided. |
getAllEntries() | Gets all entries of XarEntry type constituting the directory recursively. |
getDirectories() | Gets entries of XarDirectoryEntry type constituting the directory. |
getFiles() | Gets entries of XarFileEntry type constituting the directory. |
getFilesAndDirectories() | Gets entries of XarEntry type constituting the directory. |
extractToDirectory(String destinationDirectory)
public final void extractToDirectory(String destinationDirectory)
Extracts all the files in the current directory to the directory provided.
try (XarArchive archive = new XarArchive("archive.xar")) {
((XarDirectoryEntry)archive.getEntries().get(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()
public final Iterable<XarEntry> getAllEntries()
Gets all entries of XarEntry type constituting the directory recursively.
Returns: java.lang.Iterable<com.aspose.zip.XarEntry> - all entries of XarEntry type constituting the directory recursively
getDirectories()
public final Iterable<XarDirectoryEntry> getDirectories()
Gets entries of XarDirectoryEntry type constituting the directory.
Returns: java.lang.Iterable<com.aspose.zip.XarDirectoryEntry> - entries of XarDirectoryEntry type constituting the directory
getFiles()
public final Iterable<XarFileEntry> getFiles()
Gets entries of XarFileEntry type constituting the directory.
Returns: java.lang.Iterable<com.aspose.zip.XarFileEntry> - entries of XarFileEntry type constituting the directory
getFilesAndDirectories()
public final Iterable<XarEntry> getFilesAndDirectories()
Gets entries of XarEntry type constituting the directory.
Returns: java.lang.Iterable<com.aspose.zip.XarEntry> - entries of XarEntry type constituting the directory