more OsPath conversion
Sponsored-by: Nicholas Golder-Manning
This commit is contained in:
parent
0376bc5ee0
commit
27305042f3
24 changed files with 180 additions and 153 deletions
|
@ -12,6 +12,7 @@ module Types.Backend where
|
|||
import Types.Key
|
||||
import Types.KeySource
|
||||
import Utility.Metered
|
||||
import Utility.OsPath
|
||||
import Utility.FileSystemEncoding
|
||||
import Utility.Hash (IncrementalVerifier)
|
||||
|
||||
|
@ -20,7 +21,7 @@ data BackendA a = Backend
|
|||
, genKey :: Maybe (KeySource -> MeterUpdate -> a Key)
|
||||
-- Verifies the content of a key, stored in a file, using a hash.
|
||||
-- This does not need to be cryptographically secure.
|
||||
, verifyKeyContent :: Maybe (Key -> RawFilePath -> a Bool)
|
||||
, verifyKeyContent :: Maybe (Key -> OsPath -> a Bool)
|
||||
-- Incrementally verifies the content of a key, using the same
|
||||
-- hash as verifyKeyContent, but with the content provided
|
||||
-- incrementally a piece at a time, until finalized.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
module Types.KeySource where
|
||||
|
||||
import Utility.InodeCache
|
||||
import System.FilePath.ByteString (RawFilePath)
|
||||
import Utility.OsPath
|
||||
|
||||
{- When content is in the process of being ingested into the annex,
|
||||
- and a Key generated from it, this data type is used.
|
||||
|
@ -23,8 +23,8 @@ import System.FilePath.ByteString (RawFilePath)
|
|||
- files that may be made while they're in the process of being ingested.
|
||||
-}
|
||||
data KeySource = KeySource
|
||||
{ keyFilename :: RawFilePath
|
||||
, contentLocation :: RawFilePath
|
||||
{ keyFilename :: OsPath
|
||||
, contentLocation :: OsPath
|
||||
, inodeCache :: Maybe InodeCache
|
||||
}
|
||||
deriving (Show)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue