Documentation
¶
Overview ¶
Package archive reads archive / container formats — tar (and compressed tar), zip, 7z, rar, cpio, asar, rpm, deb and OCI image layouts — and exposes a uniform list/open surface over them. Formats are identified by content, not filename extension (see Detect), so a misnamed file still opens correctly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Detect ¶
Detect classifies an archive by its header, returning a format name ("tar", "zip", "asar", "rpm", ...) or "" when the file is not a recognized archive.
func IsOCILayout ¶
IsOCILayout reports whether path is a directory containing an OCI image layout (an oci-layout file plus an index.json). An OCI layout is read through the same archive pipeline as docker save archives, so it is a directory rather than a disk image. The single-file variant (oci-archive, e.g. `podman save --format oci` or a flatpak bundle) is a tar handled by openOCITar.