License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unix |
Safe Haskell | None |
Language | Haskell98 |
Synopsis
- data PackIndexHeader = PackIndexHeader !Word32 !(Vector Word32)
- data PackIndex hash = PackIndex {
- packIndexSha1s :: Vector (Ref hash)
- packIndexCRCs :: Vector Word32
- packIndexPackoffs :: Vector Word32
- packIndexPackChecksum :: Ref hash
- packIndexChecksum :: Ref hash
- packIndexOpen :: LocalPath -> Ref hash -> IO FileReader
- packIndexClose :: FileReader -> IO ()
- withPackIndex :: LocalPath -> Ref hash -> (FileReader -> IO a) -> IO a
- packIndexEnumerate :: HashAlgorithm hash => LocalPath -> IO [Ref hash]
- packIndexHeaderGetNbWithPrefix :: PackIndexHeader -> Int -> Word32
- packIndexGetReferenceLocation :: HashAlgorithm hash => PackIndexHeader -> FileReader -> Ref hash -> IO (Maybe Word64)
- packIndexGetReferencesWithPrefix :: HashAlgorithm hash => PackIndexHeader -> FileReader -> String -> IO [Ref hash]
- packIndexReadHeader :: FileReader -> IO PackIndexHeader
- packIndexRead :: HashAlgorithm hash => LocalPath -> Ref hash -> IO (PackIndexHeader, (Vector (Ref hash), Vector Word32, Vector Word32, [ByteString], Ref hash, Ref hash))
- packIndexGetHeader :: LocalPath -> Ref hash -> IO PackIndexHeader
Documentation
data PackIndexHeader Source #
represent an packIndex header with the version and the fanout table
Instances
Eq PackIndexHeader Source # | |
Defined in Data.Git.Storage.PackIndex (==) :: PackIndexHeader -> PackIndexHeader -> Bool # (/=) :: PackIndexHeader -> PackIndexHeader -> Bool # | |
Show PackIndexHeader Source # | |
Defined in Data.Git.Storage.PackIndex showsPrec :: Int -> PackIndexHeader -> ShowS # show :: PackIndexHeader -> String # showList :: [PackIndexHeader] -> ShowS # |
PackIndex | |
|
handles and enumeration
packIndexOpen :: LocalPath -> Ref hash -> IO FileReader Source #
open an index
packIndexClose :: FileReader -> IO () Source #
close an index
withPackIndex :: LocalPath -> Ref hash -> (FileReader -> IO a) -> IO a Source #
variant of withFile on the index file and with a FileReader
packIndexEnumerate :: HashAlgorithm hash => LocalPath -> IO [Ref hash] Source #
enumerate every indexes file in the pack directory
read from packIndex
packIndexHeaderGetNbWithPrefix :: PackIndexHeader -> Int -> Word32 Source #
get the number of reference in this index with a specific prefix
packIndexGetReferenceLocation :: HashAlgorithm hash => PackIndexHeader -> FileReader -> Ref hash -> IO (Maybe Word64) Source #
return the reference offset in the packfile if found
packIndexGetReferencesWithPrefix :: HashAlgorithm hash => PackIndexHeader -> FileReader -> String -> IO [Ref hash] Source #
get all references that start by prefix.
packIndexReadHeader :: FileReader -> IO PackIndexHeader Source #
read index header from an index filereader
packIndexRead :: HashAlgorithm hash => LocalPath -> Ref hash -> IO (PackIndexHeader, (Vector (Ref hash), Vector Word32, Vector Word32, [ByteString], Ref hash, Ref hash)) Source #
read all index
packIndexGetHeader :: LocalPath -> Ref hash -> IO PackIndexHeader Source #
get index header from an index reference