hakyll-0.4: A simple static site generator library.Source codeContentsIndex
Text.Hakyll.File
Description
A module containing various function for manipulating and examinating files and directories.
Synopsis
toDestination :: FilePath -> FilePath
toCache :: FilePath -> FilePath
toURL :: FilePath -> FilePath
removeSpaces :: FilePath -> FilePath
makeDirectories :: FilePath -> IO ()
getRecursiveContents :: FilePath -> IO [FilePath]
havingExtension :: String -> [FilePath] -> [FilePath]
isCacheValid :: FilePath -> [FilePath] -> IO Bool
directory :: (FilePath -> IO ()) -> FilePath -> IO ()
Documentation
toDestination :: FilePath -> FilePathSource
Convert a relative filepath to a filepath in the destination (_site).
toCache :: FilePath -> FilePathSource
Convert a relative filepath to a filepath in the cache (_cache).
toURL :: FilePath -> FilePathSource
Get the url for a given page.
removeSpaces :: FilePath -> FilePathSource
Swaps spaces for -.
makeDirectories :: FilePath -> IO ()Source
Given a path to a file, try to make the path writable by making all directories on the path.
getRecursiveContents :: FilePath -> IO [FilePath]Source
Get all contents of a directory. Note that files starting with a dot (.) will be ignored.
havingExtension :: String -> [FilePath] -> [FilePath]Source

A filter that takes all file names with a given extension. Prefix the extension with a dot:

 havingExtension ".markdown" ["index.markdown", "style.css"] == ["index.markdown"]
isCacheValid :: FilePath -> [FilePath] -> IO BoolSource
Check if a cache file is still valid.
directory :: (FilePath -> IO ()) -> FilePath -> IO ()Source
Perform an IO action on every file in a given directory.
Produced by Haddock version 2.4.2