2010-10-10 17:47:04 +00:00
|
|
|
{- git-annex "url" backend
|
|
|
|
- -}
|
|
|
|
|
|
|
|
module BackendUrl (backend) where
|
|
|
|
|
2010-10-12 20:06:10 +00:00
|
|
|
import Types
|
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-12 20:06:10 +00:00
|
|
|
keyValue :: State -> FilePath -> IO (Maybe Key)
|
2010-10-10 19:41:35 +00:00
|
|
|
keyValue repo file = return Nothing
|
2010-10-10 17:47:04 +00:00
|
|
|
|
2010-10-10 23:53:31 +00:00
|
|
|
-- cannot change urls
|
2010-10-12 20:06:10 +00:00
|
|
|
dummyStore :: State -> FilePath -> Key -> IO Bool
|
2010-10-10 19:41:35 +00:00
|
|
|
dummyStore repo file url = return False
|
2010-10-12 20:10:15 +00:00
|
|
|
dummyRemove :: State -> Key -> IO Bool
|
|
|
|
dummyRemove state url = return False
|
2010-10-10 19:04:18 +00:00
|
|
|
|
2010-10-12 20:10:15 +00:00
|
|
|
downloadUrl :: State -> Key -> FilePath -> IO Bool
|
|
|
|
downloadUrl state url file = error "downloadUrl unimplemented"
|