According to the docs, it should be possible to extract subdirectories, e.g.
new ZipFile("filename.zip").extractFile("folderNameInZip/", "/destination_directory");
As far as I understand, having directory entries in zips is optional, so the unzipping should not check for them. Presumably it should only compare against the user-supplied entry name (and ensure the user-supplied name ends with a slash).
According to the docs, it should be possible to extract subdirectories, e.g.
However, this requires a directory entry to be present in the archive:
As far as I understand, having directory entries in zips is optional, so the unzipping should not check for them. Presumably it should only compare against the user-supplied entry name (and ensure the user-supplied name ends with a slash).
Here's an example archive with no directory entires:
archive-no-dirs.zip
The archive was created with Powershell 7
Compress-Archivecmdlet ( https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.archive/compress-archive?view=powershell-7.1 )