Urls can now be claimed by remotes. This will allow creating, for example, a external special remote that handles magnet: and *.torrent urls.
This commit is contained in:
parent
ee27298b91
commit
30bf112185
28 changed files with 346 additions and 114 deletions
|
@ -103,7 +103,12 @@ data RemoteA a = Remote {
|
|||
-- Information about the remote, for git annex info to display.
|
||||
getInfo :: a [(String, String)],
|
||||
-- Some remotes can download from an url (or uri).
|
||||
claimUrl :: Maybe (URLString -> a Bool)
|
||||
claimUrl :: Maybe (URLString -> a Bool),
|
||||
-- Checks that the url is accessible, and gets the size of its
|
||||
-- content. Returns Nothing if the url is accessible, but
|
||||
-- its size cannot be determined inexpensively.
|
||||
-- Throws an exception if the url is inaccessible.
|
||||
checkUrl :: URLString -> a (Maybe Integer)
|
||||
}
|
||||
|
||||
instance Show (RemoteA a) where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue