Skip to main content

Module archive

Module archive 

Source
Expand description

Turns one input path into a sequence of independently-readable members.

The load-bearing decision: every tar member is handed to the caller as its own Read. That is what makes per-member line numbers, real member paths, and per-member binary detection all fall out for free.

Structs§

Outcome
What happened while walking one archive.

Functions§

for_each_member
Walk every regular member, handing each to f as its own reader.
open_decoded
Open a path and strip one layer of compression if present.
open_decoded_dropping
open_decoded, plus the option to hand the archive’s pages back to the kernel once it has been read.
walk_archive
Open path and hand each member to f, whatever kind of archive it is: a tar under any one compression, a zip, or a single compressed or plain file as one anonymous member. Never returns Err, for the reason for_each_member gives; a file that cannot be opened is an error on its Outcome.