mptar_metadata

Module: Archive Data Structures

Universal, high-level archive entry metadata. More...

#include <minipaxtar.h>

Public Attributes

Name
mptar_opt_time mtime
File modification time with optional sub-second precision.
mptar_opt_time atime
File access time (used in a PAX extended header).
mptar_opt_time ctime
File metadata change time (used in a PAX extended header).
mptar_uint64 size
Payload size in bytes.
mptar_uint64 uid
Owner user ID.
mptar_uint64 gid
Owner group ID.
const char * path
Full file path string (null-terminated).
const char * link_target
Symlink/hardlink target path string (null-terminated).
const char * uname
Owner user name string (null-terminated).
const char * gname
Owner group name string (null-terminated).
mptar_uint32 mode
UNIX file permission bitmask.
mptar_uint32 devminor
Minor device number for special files.
mptar_uint32 devmajor
Major device number for special files.
char typeflag
File entry type flag.
bool internal_alloc
True if string fields were heap-allocated internally by reader.

Detailed Description

struct mptar_metadata;

Universal, high-level archive entry metadata.

Note: Unlike the fixed-size on-disk mptar_header, this structure uses spacious data types (such as 64-bit integers for IDs and sizes) and supports unbounded strings (like fully unconstrained paths and usernames). Time values like mtime support sub-second nanosecond precision and negative epochs.

Public Attributes Documentation

variable mtime

mptar_opt_time mtime;

File modification time with optional sub-second precision.

variable atime

mptar_opt_time atime;

File access time (used in a PAX extended header).

variable ctime

mptar_opt_time ctime;

File metadata change time (used in a PAX extended header).

variable size

mptar_uint64 size;

Payload size in bytes.

variable uid

mptar_uint64 uid;

Owner user ID.

variable gid

mptar_uint64 gid;

Owner group ID.

variable path

const char * path;

Full file path string (null-terminated).

const char * link_target;

Symlink/hardlink target path string (null-terminated).

variable uname

const char * uname;

Owner user name string (null-terminated).

variable gname

const char * gname;

Owner group name string (null-terminated).

variable mode

mptar_uint32 mode;

UNIX file permission bitmask.

variable devminor

mptar_uint32 devminor;

Minor device number for special files.

variable devmajor

mptar_uint32 devmajor;

Major device number for special files.

variable typeflag

char typeflag;

File entry type flag.

Note: Standard values include:

  • '0' or '\0': Regular file
  • '1': Hard link
  • '2': Symbolic link
  • '3': Character special file
  • '4': Block special file
  • '5': Directory
  • '6': FIFO / pipe
  • '7': Contiguous file
  • 'x': PAX extended header
  • 'g': PAX global extended header

variable internal_alloc

bool internal_alloc;

True if string fields were heap-allocated internally by reader.


Updated on 2026-07-23 at 20:07:34 +0000