XarDirectoryEntry
Inheritance: java.lang.Object, com.aspose.zip.XarEntry
public final class XarDirectoryEntry extends XarEntry
Representerar katalogpost i xar-arkivet.
Metoder
| Metod | Beskrivning |
|---|---|
| extractToDirectory(String destinationDirectory) | Extraherar alla filer i den aktuella katalogen till den angivna katalogen. |
| getAllEntries() | Hämtar alla poster av typen XarEntry som utgör katalogen rekursivt. |
| getDirectories() | Hämtar poster av typen XarDirectoryEntry som utgör katalogen. |
| getFiles() | Hämtar poster av typen XarFileEntry som utgör katalogen. |
| getFilesAndDirectories() | Hämtar poster av typen XarEntry som utgör katalogen. |
extractToDirectory(String destinationDirectory)
public final void extractToDirectory(String destinationDirectory)
Extraherar alla filer i den aktuella katalogen till den angivna katalogen.
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() {#getAllEntries--}
public final Iterable
Gets all entries of [XarEntry](../../com.aspose.zip/xarentry) type constituting the directory recursively.
**Returns:**
java.lang.Iterable<com.aspose.zip.XarEntry> - all entries of [XarEntry](../../com.aspose.zip/xarentry) type constituting the directory recursively
### getDirectories() {#getDirectories--}
public final Iterable
Gets entries of [XarDirectoryEntry](../../com.aspose.zip/xardirectoryentry) type constituting the directory.
**Returns:**
java.lang.Iterable<com.aspose.zip.XarDirectoryEntry> - entries of [XarDirectoryEntry](../../com.aspose.zip/xardirectoryentry) type constituting the directory
### getFiles() {#getFiles--}
public final Iterable
Gets entries of [XarFileEntry](../../com.aspose.zip/xarfileentry) type constituting the directory.
**Returns:**
java.lang.Iterable<com.aspose.zip.XarFileEntry> - entries of [XarFileEntry](../../com.aspose.zip/xarfileentry) type constituting the directory
### getFilesAndDirectories() {#getFilesAndDirectories--}
public final Iterable
Gets entries of [XarEntry](../../com.aspose.zip/xarentry) type constituting the directory.
**Returns:**
java.lang.Iterable<com.aspose.zip.XarEntry> - entries of [XarEntry](../../com.aspose.zip/xarentry) type constituting the directory