| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
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
- type TarDecode = ExceptT ParseError IO
- data TarMember
- data TarScan
- scanTar :: Limits -> (Int -> IO ()) -> ([Text] -> Either ParseError Bool) -> (forall a. (ConduitT () ByteString TarDecode () -> IO a) -> IO a) -> IO (Either ParseError TarScan)
- tarMembers :: TarScan -> Map Text TarMember
- tarContents :: TarScan -> Map Text ByteString
- tarRawNames :: TarScan -> Bool
- resolveTarMember :: Limits -> TarScan -> Text -> Either ParseError Text
- sourceReader :: IO (Either ParseError ByteString) -> ConduitT () ByteString TarDecode ()
Documentation
type TarDecode = ExceptT ParseError IO Source #
Decoder refusals remain values while compression libraries retain their IO boundary.
Archive member kinds retain links without following host filesystem paths.
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.