ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Archive.Tar

Description

Complete PAX-aware tar traversal with bounded inventory and selected payload retention. The scan also records whether every member took its name from its raw ustar name field alone.

Synopsis

Documentation

type TarDecode = ExceptT ParseError IO Source #

Decoder refusals remain values while compression libraries retain their IO boundary.

data TarMember Source #

Archive member kinds retain links without following host filesystem paths.

Constructors

Regular 
Directory 
Link Text 

Instances

Instances details
Show TarMember Source # 
Instance details

Defined in Ecluse.Core.Registry.Archive.Tar

Eq TarMember Source # 
Instance details

Defined in Ecluse.Core.Registry.Archive.Tar

data TarScan Source #

A complete bounded inventory and only the selected regular-file payloads.

scanTar :: Limits -> (Int -> IO ()) -> ([Text] -> Either ParseError Bool) -> (forall a. (ConduitT () ByteString TarDecode () -> IO a) -> IO a) -> IO (Either ParseError TarScan) Source #

Consume the whole archive and retain only explicitly selected regular files.

tarMembers :: TarScan -> Map Text TarMember Source #

Inventory paths are canonical archive-relative names.

tarContents :: TarScan -> Map Text ByteString Source #

Missing payloads were not selected or were not regular files.

tarRawNames :: TarScan -> Bool Source #

Whether every member was named by its raw ustar name field alone. False after any PAX or GNU extended header, a ustar prefix, or bytes after the first NUL of a name or prefix field.

resolveTarMember :: Limits -> TarScan -> Text -> Either ParseError Text Source #

Resolve an inventory link with the same depth bound used during traversal.

sourceReader :: IO (Either ParseError ByteString) -> ConduitT () ByteString TarDecode () Source #

Convert a scoped decoder pull action without hiding synchronous failures or cancellation.