TarContainer

public class TarContainer: Container

Provides functions for work with TAR containers.

  • Processes TAR container and returns an array of TarEntry with information and data for all entries.

    Important

    The order of entries is defined by TAR container and, particularly, by the creator of a given TAR container. It is likely that directories will be encountered earlier than files stored in those directories, but one SHOULD NOT rely on any particular order.

    Throws

    TarError, which may indicate that either container is damaged or it might not be TAR container at all.

    Declaration

    Swift

    public static func open(container data: Data) throws -> [TarEntry]

    Parameters

    container

    TAR container’s data.

    Return Value

    Array of TarEntry.

  • Processes TAR container and returns an array of TarEntryInfo with information about entries in this container.

    Important

    The order of entries is defined by TAR container and, particularly, by the creator of a given TAR container. It is likely that directories will be encountered earlier than files stored in those directories, but one SHOULD NOT rely on any particular order.

    Throws

    TarError, which may indicate that either container is damaged or it might not be TAR container at all.

    Declaration

    Swift

    public static func info(container data: Data) throws -> [TarEntryInfo]

    Parameters

    container

    TAR container’s data.

    Return Value

    Array of TarEntryInfo.