Safe Haskell | None |
---|---|
Language | Haskell2010 |
The files we cache from the repository
Both the Local and the Remote repositories make use of this module.
- data Cache = Cache {}
- getCached :: Cache -> CachedFile -> IO (Maybe AbsolutePath)
- getCachedRoot :: Cache -> IO AbsolutePath
- getCachedIndex :: Cache -> IO (Maybe AbsolutePath)
- clearCache :: Cache -> IO ()
- getFromIndex :: Cache -> IndexLayout -> IndexFile -> IO (Maybe ByteString)
- cacheRemoteFile :: Cache -> TempPath -> Format f -> IsCached -> IO ()
Documentation
Location and layout of the local cache
getCached :: Cache -> CachedFile -> IO (Maybe AbsolutePath) Source
Get a cached file (if available)
getCachedRoot :: Cache -> IO AbsolutePath Source
Get the cached root
Calling getCachedRoot
without root info available is a programmer error
and will result in an unchecked exception. See requiresBootstrap
.
getCachedIndex :: Cache -> IO (Maybe AbsolutePath) Source
Get the cached index (if available)
clearCache :: Cache -> IO () Source
Delete a previously downloaded remote file
getFromIndex :: Cache -> IndexLayout -> IndexFile -> IO (Maybe ByteString) Source
Get a file from the index