summaryrefslogtreecommitdiff
path: root/Types/UrlContents.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 15:32:42 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 15:33:42 -0400
commitc4ff79b1a460a3526c6772ab754cb34e5f7f3dd2 (patch)
tree80bea71f1d453348cb2d0a92ce10e463aab9259e /Types/UrlContents.hs
parent4e88f7e9af6a776347649047f2473e470a729ed9 (diff)
Expand checkurl to support recommended filename, and multi-file-urls
This commit was sponsored by an anonymous bitcoiner.
Diffstat (limited to 'Types/UrlContents.hs')
-rw-r--r--Types/UrlContents.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Types/UrlContents.hs b/Types/UrlContents.hs
new file mode 100644
index 000000000..81b195fe3
--- /dev/null
+++ b/Types/UrlContents.hs
@@ -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)]