Skip to content
FutureBlitz

    Install

    Import std.compress.tar

    TarWriter

    std.compress.tar

    class

    Public Class TarWriter

    A new tar, an entry at a time: Add puts in a file, AddFolder a folder, and Finish gives the tar and starts again, empty.

    std/compress/tar.fb, line 85

    • Public New() constructor #

      A new TarWriter, with no entries.

    • @PanicsAtCaller Public Method Add(name: String, data: UInt8[], modified: Timestamp? = Null, mode: Int? = Null) method #

      Adds a file named name of data, last changed at modified, or at 1970's start when that's Null, and with mode, or 644 when that's Null. Panics when the mode isn't from 0 to 0o7777, or when the name is "", holds a NUL, or ends with '/', as a folder's does.

    • @PanicsAtCaller Public Method AddFolder(name: String, modified: Timestamp? = Null, mode: Int? = Null) method #

      Adds a folder named name, with '/' after it unless it has one, last changed at modified, as Add's are, with mode, or 755 when that's Null. Panics when the mode isn't from 0 to 0o7777, or when the name is "" or holds a NUL.

    • @PanicsAtCaller Public Method Finish(): UInt8[] method #

      The tar, of the entries added since it started, and then it starts again, empty. Panics when it's more bytes than a UInt8[] holds.

    Report an issue with this page or with FutureBlitz on GitHub.