git-annex/BackendChecksum.hs

19 lines
424 B
Haskell
Raw Normal View History

2010-10-10 19:27:49 +00:00
{- git-annex "checksum" backend
- -}
module BackendChecksum (backend) where
import qualified BackendFile
import Data.Digest.Pure.SHA
2010-10-12 20:06:10 +00:00
import Types
2010-10-10 19:27:49 +00:00
-- based on BackendFile just with a different key type
backend = BackendFile.backend {
name = "checksum",
getKey = keyValue
}
2010-10-10 19:41:35 +00:00
-- checksum the file to get its key
2010-10-12 20:06:10 +00:00
keyValue :: State -> FilePath -> IO (Maybe Key)
2010-10-10 19:41:35 +00:00
keyValue k = error "checksum keyValue unimplemented" -- TODO