diff options
Diffstat (limited to 'Backend.hs')
-rw-r--r-- | Backend.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Backend.hs b/Backend.hs index 0ee56d262..4b0095214 100644 --- a/Backend.hs +++ b/Backend.hs @@ -24,6 +24,7 @@ module Backend ( removeKey, hasKey, fsckKey, + upgradableKey, lookupFile, chooseBackends, keyBackend, @@ -130,6 +131,10 @@ fsckKey backend key file numcopies = do backend_ok <-(B.fsckKey backend) key file numcopies return $ size_ok && backend_ok +{- Checks if a key is upgradable to a newer representation. -} +upgradableKey :: Backend Annex -> Key -> Annex Bool +upgradableKey backend key = (B.upgradableKey backend) key + {- Looks up the key and backend corresponding to an annexed file, - by examining what the file symlinks to. -} lookupFile :: FilePath -> Annex (Maybe (Key, Backend Annex)) |