The OpenD Programming Language

TarFileHeader

A header of a file in the archive. This represents the binary format of the header block.

struct TarFileHeader {
char[100] fileName_;
char[8] fileMode_;
char[8] ownerUid_;
char[8] ownerGid_;
char[12] size_;
char[12] mtime_;
char[8] checksum_;
char[1] fileType_;
char[100] linkFileName_;
char[6] ustarMagic_;
char[2] ustarVersion_;
char[32] ownerName_;
char[32] groupName_;
char[8] deviceMajorNumber_;
char[8] deviceMinorNumber_;
char[155] filenamePrefix_;
}

Members

Functions

filename
const(char)[] filename()

Returns the filename. You should cache the return value as long as TarFileHeader is in scope (it returns a slice after calling strlen)

linkFileName
const(char)[] linkFileName()

Returns the target of a symlink or hardlink. Remember, this returns a slice of the TarFileHeader structure, so once it goes out of scope, this slice will be dangling!

mode
uint mode()
size
ulong size()
type
TarFileType type()

Meta