Archiver
class in package klyn.io.archives

    public abstract class Archiver:

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)

Methods

Modifier and Type | Member | Description
--- | --- | ---
public static | getInstance `getInstance(format as ArchiveFormat) as Archiver throws IOException:` | Returns an archiver implementation for the requested format.
public abstract | makeArchive `makeArchive(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 | unpackArchive `unpackArchive(archivePath as String, destinationPath as String, mode as FileAccessMode = FileAccessMode.CREATE_NEW) as Void throws IOException:` | Unpacks an archive into a destination directory.