MIT licensed by Jens Petersen
Maintained by [email protected]
This version can be pinned in stack with:http-directory-0.1.10@sha256:16cc8b41057922edead309649a948cdbdf612e47898277a38fe917a7116fa6fc,3161

Module documentation for 0.1.10

http-directory

Hackage MIT license Stackage LTS Stackage Nightly

A simple library for reading http directories.

It uses http-client or http-conduit 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.

Additionally there are methods for checking the size and modification time, and a few other helper functions.

Usage examples

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 details.

Changes

Changelog

http-directory uses PVP Versioning.

0.1.10 (2022-06-11)

  • add httpFileSizeTime and httpFileHeaders

0.1.9 (2021-12-09)

  • httpDirectory’ now uses Network.HTTP.Simple
  • also add httpRawDirectory’, httpExists’, httpFileSize’, httpLastModified’ which all use Network.HTTP.Simple too
  • add +/+ path combinator

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)