klyn.io.archives.Archiver.unpackArchive
method
public unpackArchive(archivePath as Path, destinationPath as Path, mode as FileAccessMode = FileAccessMode.CREATE_NEW) as Void throws IOException:
Description

Unpacks an archive using Path objects for both source and destination.

Parameters
ParameterDescription
archivePathArchive file path.
destinationPathDestination directory path.
modeTarget creation policy.
Throws
  • IOException if either path is null or extraction fails.
Example
zip = ZipArchiver()
zip.unpackArchive(FilePath("reports.zip"), FolderPath("reports"))