summaryrefslogtreecommitdiff
path: root/Backend/Checksum.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Backend/Checksum.hs')
-rw-r--r--Backend/Checksum.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/Backend/Checksum.hs b/Backend/Checksum.hs
new file mode 100644
index 000000000..bfc789e40
--- /dev/null
+++ b/Backend/Checksum.hs
@@ -0,0 +1,18 @@
+{- git-annex "checksum" backend
+ - -}
+
+module Backend.Checksum (backend) where
+
+import qualified Backend.File
+import Data.Digest.Pure.SHA
+import BackendTypes
+
+-- based on BackendFile just with a different key type
+backend = Backend.File.backend {
+ name = "checksum",
+ getKey = keyValue
+}
+
+-- checksum the file to get its key
+keyValue :: FilePath -> Annex (Maybe Key)
+keyValue k = error "checksum keyValue unimplemented" -- TODO