class Minitar::PosixHeader

Implements the POSIX tar header as a Ruby class. The structure of the POSIX tar header is:

struct tarfile_entry_posix { // pack unpack char name; // ASCII (+ Z unless filled) a100 Z100 char mode; // 0 padded, octal, null a8 A8 char uid; // 0 padded, octal, null a8 A8 char gid; // 0 padded, octal, null a8 A8 char size; // 0 padded, octal, null a12 A12 char mtime; // 0 padded, octal, null a12 A12 char checksum; // 0 padded, octal, null, space a8 A8 char typeflag; // see below a a char linkname; // ASCII + (Z unless filled) a100 Z100 char magic; // “ustar0” a6 A6 char version; // “00” a2 A2 char uname; // ASCIIZ a32 Z32 char gname; // ASCIIZ a32 Z32 char devmajor; // 0 padded, octal, null a8 A8 char devminor; // 0 padded, octal, null a8 A8 char prefix; // ASCII (+ Z unless filled) a155 Z155 };

The typeflag is one of several known values. POSIX indicates that “A POSIX-compliant implementation must treat any unrecognized typeflag value as a regular file.”