License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unix |
Safe Haskell | None |
Language | Haskell98 |
- newtype Zipped = Zipped {}
- looseUnmarshall :: ByteString -> Object
- looseUnmarshallRaw :: ByteString -> (ObjectHeader, ObjectData)
- looseUnmarshallZipped :: Zipped -> Object
- looseUnmarshallZippedRaw :: Zipped -> (ObjectHeader, ObjectData)
- looseMarshall :: Object -> ByteString
- looseRead :: FilePath -> Ref -> IO Object
- looseReadHeader :: FilePath -> Ref -> IO (ObjectType, Word64, Maybe a)
- looseReadRaw :: FilePath -> Ref -> IO (ObjectHeader, ObjectData)
- looseExists :: FilePath -> Ref -> IO Bool
- looseWriteBlobFromFile :: FilePath -> FilePath -> IO Ref
- looseWrite :: FilePath -> Object -> IO Ref
- looseEnumeratePrefixes :: FilePath -> IO [[Char]]
- looseEnumerateWithPrefixFilter :: FilePath -> String -> (Ref -> Bool) -> IO [Ref]
- looseEnumerateWithPrefix :: FilePath -> String -> IO [Ref]
Documentation
marshall from and to lazy bytestring
looseUnmarshall :: ByteString -> Object Source
unmarshall an object (with header) from a bytestring.
looseUnmarshallRaw :: ByteString -> (ObjectHeader, ObjectData) Source
unmarshall an object as (header, data) tuple from a bytestring
looseUnmarshallZipped :: Zipped -> Object Source
unmarshall an object (with header) from a zipped stream.
looseUnmarshallZippedRaw :: Zipped -> (ObjectHeader, ObjectData) Source
unmarshall an object as (header, data) tuple from a zipped stream
looseMarshall :: Object -> ByteString Source
marshall as lazy bytestring an object except deltas.
read and check object existence
looseRead :: FilePath -> Ref -> IO Object Source
read a specific ref from a loose object and returns an object
looseReadHeader :: FilePath -> Ref -> IO (ObjectType, Word64, Maybe a) Source
read only the header of a loose object.
looseReadRaw :: FilePath -> Ref -> IO (ObjectHeader, ObjectData) Source
read a specific ref from a loose object and returns an header and data.
write objects
looseWriteBlobFromFile :: FilePath -> FilePath -> IO Ref Source
create a new blob on a temporary location and on success move it to the object store with its digest name.
looseWrite :: FilePath -> Object -> IO Ref 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 :: FilePath -> IO [[Char]] Source
enumarate all prefixes available in the object store.