Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- readArchive :: MonadIO m => FilePath -> Unfold m Void (Either Header ByteString)
- groupByHeader :: Monad m => Fold m (Either Header ByteString) b -> Stream m (Either Header ByteString) -> Stream m b
- data Header
- data FileType
- headerFileType :: Header -> IO (Maybe FileType)
- headerPathName :: Header -> IO (Maybe ByteString)
- headerPathNameUtf8 :: Header -> IO (Maybe ByteString)
- headerSize :: Header -> IO (Maybe Int)
Read
readArchive :: MonadIO m => FilePath -> Unfold m Void (Either Header ByteString) Source #
Creates an unfold with which we can stream data out of the given archive.
groupByHeader :: Monad m => Fold m (Either Header ByteString) b -> Stream m (Either Header ByteString) -> Stream m b Source #
A convenience function for grouping Either Header ByteString
s, usually obtained with
readArchive
, by the headers. The input Fold
processes a single entry (a Header
followed by
zero or more ByteString
s).
Header
FileTypeRegular | |
FileTypeSymlink | |
FileTypeSocket | |
FileTypeCharDevice | |
FileTypeBlockDevice | |
FileTypeDirectory | |
FileTypeNamedPipe |
headerPathName :: Header -> IO (Maybe ByteString) Source #
headerPathNameUtf8 :: Header -> IO (Maybe ByteString) Source #