Safe Haskell | None |
---|
- update :: Fetcher -> FilePath -> String -> [DebSource] -> IO [Maybe (FilePath, Compression)]
- type Fetcher = URI -> FilePath -> Maybe UTCTime -> IO Bool
- data CheckSums = CheckSums {}
- data Compression
- = BZ2
- | GZ
- | Uncompressed
- type FileTuple = (CheckSums, Size, FilePath)
- type Size = Integer
- controlFromIndex :: Compression -> FilePath -> ByteString -> Either ParseError (Control' Text)
- controlFromIndex' :: Compression -> FilePath -> IO (Either ParseError (Control' Text))
- findContentsFiles :: (FilePath -> Bool) -> FilePath -> IO [FilePath]
- findIndexes :: FilePath -> String -> [FileTuple] -> IO [(FileTuple, Compression)]
- indexesInRelease :: (FilePath -> Bool) -> Control' Text -> [(CheckSums, Integer, FilePath)]
- tupleFromFilePath :: FilePath -> FilePath -> IO (Maybe FileTuple)
Documentation
:: Fetcher | function that will do actually downloading |
-> FilePath | download indexes to the directory (must already exist) |
-> String | binary architecture |
-> [DebSource] | sources.list |
-> IO [Maybe (FilePath, Compression)] | (basename of index file, compression status) |
update - similar to apt-get update
type Fetcher = URI -> FilePath -> Maybe UTCTime -> IO BoolSource
function-type for a function that downloads a file The timestamp is optional. If the local file is as new or newer than the remote copy, the download may be skipped.
A good choice might be a partially parameterized call to
fetch
data Compression Source
Package indexes on the server are uncompressed or compressed with gzip or bzip2. We do not know what will exist on the server until we actually look. This type is used to mark the compression status of what was actually found.
controlFromIndex :: Compression -> FilePath -> ByteString -> Either ParseError (Control' Text)Source
Parse a possibly compressed index file.
controlFromIndex' :: Compression -> FilePath -> IO (Either ParseError (Control' Text))Source
parse an index possibly compressed file
findContentsFiles :: (FilePath -> Bool) -> FilePath -> IO [FilePath]Source
find the Contents-* files. These are not listed in the Release file
findIndexes :: FilePath -> String -> [FileTuple] -> IO [(FileTuple, Compression)]Source