public abstract class Archiver:
Base class for archive readers and writers.
Implementations must produce real archive formats directly. They must not shell out to system tools because archive support is part of the Klyn runtime contract.
import klyn.io
import klyn.io.archives
archiver = Archiver.getInstance(ArchiveFormat.ZIP)
archiver.makeArchive("docs", "docs.zip", FileAccessMode.OVERWRITE)| Modifier and Type | Member | Description |
|---|---|---|
| public static | getInstancegetInstance(format as ArchiveFormat) as Archiver throws IOException: |
Returns an archiver implementation for the requested format. |
| public abstract | makeArchivemakeArchive(sourcePath as String, archivePath as String, mode as FileAccessMode = FileAccessMode.CREATE_NEW) as Void throws IOException: |
Creates an archive from a file or directory. |
| public abstract | unpackArchiveunpackArchive(archivePath as String, destinationPath as String, mode as FileAccessMode = FileAccessMode.CREATE_NEW) as Void throws IOException: |
Unpacks an archive into a destination directory. |