Skip to content

Entry

Metadata and streaming content for the current TAR entry.

The handle remains valid only until its parent Reader advances or leaves scope. Iterating an entry yields arbitrary-sized Bin chunks until the content is exhausted.

Example

for chunk = entry
  output.put $chunk

Inherits from: Iter[Bin]

Fields

device_major

Device major number, or nil when absent.

device_minor

Device minor number, or nil when absent.

gid

Numeric group ID.

group_name

Group name, or nil when absent.

link_name

Link target as an fs.unix.Path, or nil when absent.

mode

Unix permission bits.

mtime

Modification time as DateTime.

owner_name

Owner name, or nil when absent.

path

Entry path as an fs.unix.Path.

size

Declared content size in bytes.

type

Entry type as :FILE:, :DIR:, :HARDLINK:, :SYMLINK:, :FIFO:, :CHAR_DEVICE:, :BLOCK_DEVICE:, :CONTIGUOUS:, or :UNKNOWN:.

uid

Numeric owner ID.

Methods

(next)()

Yields the next content chunk, ending iteration once the entry is exhausted.

read size -> Bin

Reads up to size bytes from the current content position.

Parameters

NameTypeDescription
size Int Maximum bytes to read.

Example

let prefix = entry.read 512