module

Pomtex::Seed::Extractor

Streams tar archives (.tar, .tar.gz, .tar.xz) straight into a target tree.

The tar reader is implemented here (ustar + GNU long names + PAX paths); xz goes through liblzma and gzip through the stdlib, so no external tools run.

Constants

BLOCK = 512

Instance methods

each_entry(io : IO, & : Entry, IO -> ) : Nil

Iterates over tar entries. data is positioned at the entry payload; any unread payload is skipped automatically.

Source
extract(archive : Path | String, dest : Path, &rename : String -> String | Nil) : Array(String)

Unpacks archive under dest. The block may rewrite each entry name or return nil to skip it.

Source
extract_aril(archive : Path | String, texmf : Path = Config.texmf_dir) : Array(String)

Unpacks a TeX Live aril container into the user texmf tree, skipping the tlpkg/ metadata. Returns the relative paths of the files written.

Source
sanitize(name : String) : String | Nil

Normalises an archive path, rejecting absolute paths and .. traversal.

Source
with_decompressed(path : String, & : IO -> ) : Nil

Yields an IO over the decompressed tar stream.

Source

Nested types