Safe Haskell | None |
---|---|
Language | Haskell2010 |
Pack file support.
Synopsis
- data PackFile
- findPackSha :: PackFile -> Sha1 -> Maybe Object
- readPackFile :: RawFilePath -> IO PackFile
- writePackFile :: MonadIO m => (PackFile -> m ()) -> RawFilePath -> [Object] -> m ()
- data PackingT m a
- packObject :: MonadIO m => Object -> PackingT m Sha1
- flushPackFile :: MonadIO m => (PackFile -> m ()) -> PackingT m ()
- runPackingT :: MonadIO m => (PackFile -> m ()) -> RawFilePath -> PackingT m a -> m a
Documentation
Representation of a parsed pack file.
readPackFile :: RawFilePath -> IO PackFile Source #
Read a PackFile
off the filesystem.
writePackFile :: MonadIO m => (PackFile -> m ()) -> RawFilePath -> [Object] -> m () Source #
Write the given objects to a packfile using the given path as a template for the tempfile. The pack will be written to the same directory as the tempfile. Also writes the pack index.
A monad transformer for writing packfiles.
Instances
flushPackFile :: MonadIO m => (PackFile -> m ()) -> PackingT m () Source #
Write out the currently accumulating packfile, and start writing a new one.
runPackingT :: MonadIO m => (PackFile -> m ()) -> RawFilePath -> PackingT m a -> m a Source #
Run a PackingT
computation, using the given path as a template for the tempfile. The pack
and the index will be written to the same directory as the tempfile.