Skip to content
FutureBlitz

    Install

    Import std.compress.archive

    std.compress.archive

    What Zip's, Tar's, and SevenZip's readers share: an ArchiveEntry for each of an archive's entries, in the order the archive has them, and how a name and a mode are checked before they're written.

    std/compress/archive.fb

    Types

    ArchiveEntryKind enum

    Public Enum ArchiveEntryKind

    What an entry is.

    std/compress/archive.fb, line 9

    • FILE enum member #

      A file, whose bytes the entry holds.

    • FOLDER enum member #

      A folder.

    ArchiveEntry struct

    Public Struct ArchiveEntry

    One of an archive's entries: its Name, its path in the archive, with '/' between folders and none at its end, its Kind, its Size, the bytes a file's read gives, which is 0 for a folder or a link, a link's Target, which is "" for the rest, when it was Modified, and its Mode, its Unix permissions, like 0o644. Either is Null when the archive doesn't say, as a 7z's aren't read, and a zip made on Windows has no mode. A name is as the archive has it, which can be anything: a program that makes files of them checks them first, for one like "../../x".

    std/compress/archive.fb, line 24

    • Public ReadOnly Field Name: String field #

      Its path in the archive, with '/' between folders and none at its end.

    • Public ReadOnly Field Kind: ArchiveEntryKind field #

      Whether it's a file, a folder, or a link.

    • Public ReadOnly Field Size: Int64 field #

      How many bytes a file's read gives, or 0 for a folder or a link.

    • Public ReadOnly Field Target: String field #

      What a link points to, or "" for the rest.

    • Public ReadOnly Field Modified: Timestamp? field #

      When it was modified, or Null when the archive doesn't say.

    • Public ReadOnly Field Mode: Int? field #

      Its Unix permissions, like 0o644, or Null when the archive doesn't say.

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