MIT licensed by Jens Petersen
Maintained by [email protected]
This version can be pinned in stack with:http-directory-0.1.8@sha256:a5a5b8e38fec3f7252a7f00d09c5de0062c1f7b01b0c6eda299a55ce7c706f40,2211

Module documentation for 0.1.8

http-directory

Hackage MIT license Stackage Lts Stackage Nightly Build status

A simple library for reading http directories.

It uses http-client for http transport, and html-conduit and xml-conduit to parse the html for links.

The library is intended for listing the files in http file directories, but since http directories are just html pages it can also be used to list the links (href’s) on any html webpage.

Usage Example

Network.HTTP.Directory> :type httpDirectory'
httpDirectory' :: String -> IO [Text]
Network.HTTP.Directory> httpDirectory' "https://hackage.haskell.org/package/base/src/System"
["CPUTime.hsc","Environment.hs","Exit.hs","IO.hs","Info.hs","Mem.hs","Timeout.hs",
"CPUTime","Console","Environment","IO","Mem","Posix"]

See more examples and the latest haddock documentation for more usage details.

Changes

Changelog

http-directory uses PVP Versioning.

0.1.8 (2020-03-12)

  • fix regression in 0.1.6 and 0.1.7: do not filter “*/” files
  • more careful filter handling of ‘/’
  • filter infix ‘#’

0.1.7 (2020-01-24)

  • drop </> since it conflicts with filepath
  • deprecates 0.1.6

0.1.6 (2020-01-24)

  • filter relative/paths and relative?queries
  • add url </> file
  • add trailingSlash for url and noTrailingSlash for filename

0.1.5 (2019-06-xx)

  • also filter “..”, “#” and “:” from httpDirectory
  • export Manager
  • add isHttpUrl
  • testsuite added

0.1.4 (2019-06-07)

  • add httpRawDirectory
  • httpDirectory now filters out absolutes hrefs and sort links
  • add httpDirectory’ and httpRedirect’ variants with own Manager

0.1.3 (2019-06-04)

  • add httpExists

0.1.2 (2019-05-07)

  • add httpManager convenient function
  • print url when result not 200
  • add an example

0.1.1 (2019-04-14)

  • add httpLastModified

0.1.0 (2019-04-11)

  • initial release with httpDirectory, httpFileSize, and httpRedirect(s)