Copyright | (c) 2016-2017 Red Hat Inc. |
---|---|
License | LGPL |
Maintainer | https://github.com/weldr |
Stability | alpha |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Conduit-based interface between BDCS and its underlying content store.
Documentation
An object in the content store is either a regular file or something else
(directory, symlink, etc.) described by the Files
metadata.
SpecialObject | Some non-file object that should be accompanied
by a |
FileObject ByteString | A file object with its contents |
filesToObjectsC :: (MonadError String m, MonadIO m) => ContentStore -> Conduit Files m (Files, Object) Source #
Read Files
records from a Conduit
, find the object in the content store, and return the
matching Object
if found. An error is thrown if the object does not exist, or if there is
any other error interacting with the content store. In addition, the Files
object is also
returned as part of the result tuple so its metadata can be used by downstream consumers.
objectToTarEntry :: (MonadError String m, MonadIO m) => Conduit (Files, Object) m Entry Source #
Read tuples from a Conduit
and convert each into a Entry
suitable for
streaming into an archive. Metadata such as permissions and ownerships will be set correctly.
Symlinks and other special non-file things will be handled correctly. This function is suitable
as a downstream consumer of filesToObjectsC
.