-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Extra functionality for shellmate.
--
-- HTTP downloads and parsing for various file formats.
@package shellmate-extras
@version 0.3.4
-- | Extract various archive files in a consistent manner.
module Control.Shell.Extract
-- | Extract an archive with the default options. See ExtractOptions
-- for details.
extract :: FilePath -> Shell ()
-- | Extract an archive with the given extraction options.
extractWith :: ExtractOptions -> FilePath -> Shell ()
-- | The list of supported archive format file extensions. On a typical
-- LinuxOSXCygwin/MinGW system, .tar, .tar.gz, .tar.bz2, .tar.xz,
-- .tbz2, .tgz, .bz2, .gz and .xz should all be supported. If the
-- appropriate programs are installed, .zip, .rar and .7z should also be
-- supported.
supportedExtensions :: [String]
-- | Can the given file be extracted, as determined by comparing the file
-- extension to the list of supported extensions.
canExtract :: FilePath -> Bool
data ExtractOptions
-- | Extract archive into a separate directory. The name of the directory
-- will be the base name of the archive. If the archive contains a single
-- directory on the top-level, the contents of that directory will be
-- moved into the outer directory. This ensures that tarbombs and
-- non-tarbombs are treated consistently.
--
-- If this option is set to False, archives will be unpacked
-- into the current working directory.
--
-- Default: True
separateDirectory :: ExtractOptions -> Bool
-- | Remove the archive after extraction?
--
-- Default: False
removeArchive :: ExtractOptions -> Bool
-- | Default extraction options. See ExtractOptions for defaults.
defaultExtractOptions :: ExtractOptions
-- | High level functions for downloading files.
module Control.Shell.Download
-- | A Uniform Resource Locator.
type URI = String
-- | Download content specified by a URL, returning the content as a
-- String. The content is interpreted as UTF8.
fetch :: URI -> Shell String
-- | Download content specified by a URL, returning the content as a strict
-- ByteString.
fetchBytes :: URI -> Shell ByteString
-- | Download content specified by a URL, writing the content to the file
-- specified by the given FilePath.
fetchFile :: FilePath -> URI -> Shell ()
-- | Download the content as for fetch, but return it as a list of
-- parsed tags using the tagsoup html parser.
fetchTags :: URI -> Shell [Tag String]
-- | Download the content as for fetch, but return it as parsed XML,
-- using the xml-light parser.
fetchXML :: URI -> Shell [Content]
-- | Download the content as for fetch, but return it as as parsed
-- RSS or Atom content, using the feed library parser.
fetchFeed :: URI -> Shell Feed