summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-08-19 12:24:55 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-08-19 12:24:55 -0400
commit52f4a0722c3c6f71cea0666cba3f27adc085d629 (patch)
tree3789171e5fc0628d4fcd549309333ce1cd9eb9ee /Utility
parentbbd8b63d4768c51bb804dcf03a17fdd895997ab5 (diff)
importfeed --relaxed: Avoid hitting the urls of items in the feed.
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Url.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Utility/Url.hs b/Utility/Url.hs
index 90ca74eaf..976fe975d 100644
--- a/Utility/Url.hs
+++ b/Utility/Url.hs
@@ -20,6 +20,7 @@ module Utility.Url (
exists,
UrlInfo(..),
getUrlInfo,
+ assumeUrlExists,
download,
downloadQuiet,
parseURIRelaxed
@@ -104,6 +105,9 @@ data UrlInfo = UrlInfo
, urlSuggestedFile :: Maybe FilePath
}
+assumeUrlExists :: UrlInfo
+assumeUrlExists = UrlInfo True Nothing Nothing
+
{- Checks that an url exists and could be successfully downloaded,
- also returning its size and suggested filename if available. -}
getUrlInfo :: URLString -> UrlOptions -> IO UrlInfo