achille-0.0.0: A library for building static site generators
Safe HaskellNone
LanguageHaskell2010

Achille.Internal.IO

Description

Defines an IO interface for core recipes

Synopsis

Documentation

readFile :: AchilleIO m => FilePath -> m ByteString Source #

Retrieve a file as a bytestring.

readFileLazy :: AchilleIO m => FilePath -> m ByteString Source #

Retrieve a file as a lazy bytestring.

copyFile :: AchilleIO m => FilePath -> FilePath -> m () Source #

Copy a file from one location to another.

writeFile :: AchilleIO m => FilePath -> ByteString -> m () Source #

Write a bytestring to a file.

writeFileLazy :: AchilleIO m => FilePath -> ByteString -> m () Source #

Write a lazy bytestring to a file.

doesFileExist :: AchilleIO m => FilePath -> m Bool Source #

Check whether a file exists.

doesDirExist :: AchilleIO m => FilePath -> m Bool Source #

Check whether a directory exists.

callCommand :: AchilleIO m => String -> m () Source #

Run a shell command in a new process.

log :: AchilleIO m => String -> m () Source #

Log a string to stdout.

glob Source #

Arguments

:: AchilleIO m 
=> FilePath

Path of the root directory.

-> Pattern 
-> m [FilePath] 

Find all paths matching a given globpattern, relative to a given directory.

getModificationTime :: AchilleIO m => FilePath -> m UTCTime Source #

Get modification time of a file.

fail :: MonadFail m => String -> m a #