Expand checkurl to support recommended filename, and multi-file-urls
This commit was sponsored by an anonymous bitcoiner.
This commit is contained in:
parent
7ae16bb6f7
commit
2cd84fcc8b
18 changed files with 115 additions and 77 deletions
19
Types/UrlContents.hs
Normal file
19
Types/UrlContents.hs
Normal file
|
@ -0,0 +1,19 @@
|
|||
{- git-annex URL contents
|
||||
-
|
||||
- Copyright 2014 Joey Hess <joey@kitenet.net>
|
||||
-
|
||||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
module Types.UrlContents where
|
||||
|
||||
import Utility.Url
|
||||
|
||||
data UrlContents
|
||||
-- An URL contains a file, whose size may be known.
|
||||
-- A default filename will be provided, and can be overridded
|
||||
-- or built on.
|
||||
= UrlContents (Maybe Integer) (FilePath -> FilePath)
|
||||
-- Sometimes an URL points to multiple files, each accessible
|
||||
-- by their own URL.
|
||||
| UrlNested [(URLString, UrlContents)]
|
Loading…
Add table
Add a link
Reference in a new issue