License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unix |
Safe Haskell | None |
Language | Haskell98 |
Synopsis
- newtype Zipped = Zipped {}
- looseUnmarshall :: HashAlgorithm hash => ByteString -> Object hash
- looseUnmarshallRaw :: ByteString -> (ObjectHeader hash, ObjectData)
- looseUnmarshallZipped :: HashAlgorithm hash => Zipped -> Object hash
- looseUnmarshallZippedRaw :: Zipped -> (ObjectHeader hash, ObjectData)
- looseMarshall :: Object hash -> ByteString
- looseRead :: HashAlgorithm hash => LocalPath -> Ref hash -> IO (Object hash)
- looseReadHeader :: HashAlgorithm hash => LocalPath -> Ref hash -> IO (ObjectHeader hash)
- looseReadRaw :: HashAlgorithm hash => LocalPath -> Ref hash -> IO (ObjectHeader hash, ObjectData)
- looseExists :: HashAlgorithm hash => LocalPath -> Ref hash -> IO Bool
- looseWriteBlobFromFile :: HashAlgorithm hash => LocalPath -> LocalPath -> IO (Ref hash)
- looseWrite :: HashAlgorithm hash => LocalPath -> Object hash -> IO (Ref hash)
- looseEnumeratePrefixes :: LocalPath -> IO [[Char]]
- looseEnumerateWithPrefixFilter :: HashAlgorithm hash => LocalPath -> String -> (Ref hash -> Bool) -> IO [Ref hash]
- looseEnumerateWithPrefix :: HashAlgorithm hash => LocalPath -> String -> IO [Ref hash]
Documentation
marshall from and to lazy bytestring
looseUnmarshall :: HashAlgorithm hash => ByteString -> Object hash Source #
unmarshall an object (with header) from a bytestring.
looseUnmarshallRaw :: ByteString -> (ObjectHeader hash, ObjectData) Source #
unmarshall an object as (header, data) tuple from a bytestring
looseUnmarshallZipped :: HashAlgorithm hash => Zipped -> Object hash Source #
unmarshall an object (with header) from a zipped stream.
looseUnmarshallZippedRaw :: Zipped -> (ObjectHeader hash, ObjectData) Source #
unmarshall an object as (header, data) tuple from a zipped stream
looseMarshall :: Object hash -> ByteString Source #
marshall as lazy bytestring an object except deltas.
read and check object existence
looseRead :: HashAlgorithm hash => LocalPath -> Ref hash -> IO (Object hash) Source #
read a specific ref from a loose object and returns an object
looseReadHeader :: HashAlgorithm hash => LocalPath -> Ref hash -> IO (ObjectHeader hash) Source #
read only the header of a loose object.
looseReadRaw :: HashAlgorithm hash => LocalPath -> Ref hash -> IO (ObjectHeader hash, ObjectData) Source #
read a specific ref from a loose object and returns an header and data.
looseExists :: HashAlgorithm hash => LocalPath -> Ref hash -> IO Bool Source #
check if a specific ref exists as loose object
write objects
looseWriteBlobFromFile :: HashAlgorithm hash => LocalPath -> LocalPath -> IO (Ref hash) Source #
create a new blob on a temporary location and on success move it to the object store with its digest name.
looseWrite :: HashAlgorithm hash => LocalPath -> Object hash -> IO (Ref hash) Source #
write an object to disk as a loose reference. use looseWriteBlobFromFile for efficiently writing blobs when being commited from a file.
enumeration of loose objects
looseEnumeratePrefixes :: LocalPath -> IO [[Char]] Source #
enumarate all prefixes available in the object store.
looseEnumerateWithPrefixFilter :: HashAlgorithm hash => LocalPath -> String -> (Ref hash -> Bool) -> IO [Ref hash] Source #
enumerate all references available with a specific prefix.
looseEnumerateWithPrefix :: HashAlgorithm hash => LocalPath -> String -> IO [Ref hash] Source #