git-annex/BackendUrl.hs

29 lines
646 B
Haskell
Raw Normal View History

2010-10-10 17:47:04 +00:00
{- git-annex "url" backend
- -}
module BackendUrl (backend) where
2010-10-11 21:52:46 +00:00
import BackendType
2010-10-11 21:19:55 +00:00
import GitRepo
2010-10-10 17:47:04 +00:00
backend = Backend {
name = "url",
2010-10-10 19:04:18 +00:00
getKey = keyValue,
storeFileKey = dummyStore,
2010-10-10 23:53:31 +00:00
retrieveKeyFile = downloadUrl,
removeKey = dummyRemove
2010-10-10 17:47:04 +00:00
}
-- cannot generate url from filename
2010-10-10 19:41:35 +00:00
keyValue :: GitRepo -> FilePath -> IO (Maybe Key)
keyValue repo file = return Nothing
2010-10-10 17:47:04 +00:00
2010-10-10 23:53:31 +00:00
-- cannot change urls
dummyStore :: GitRepo -> FilePath -> Key -> IO Bool
2010-10-10 19:41:35 +00:00
dummyStore repo file url = return False
2010-10-10 23:53:31 +00:00
dummyRemove :: Key -> IO Bool
dummyRemove url = return False
2010-10-10 19:04:18 +00:00
2010-10-10 23:53:31 +00:00
downloadUrl :: Key -> FilePath -> IO Bool
2010-10-10 19:41:35 +00:00
downloadUrl url file = error "downloadUrl unimplemented"