Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines an IO interface for core recipes
Synopsis
- class (Monad m, MonadFail m) => AchilleIO m
- readFile :: AchilleIO m => FilePath -> m ByteString
- readFileLazy :: AchilleIO m => FilePath -> m ByteString
- copyFile :: AchilleIO m => FilePath -> FilePath -> m ()
- writeFile :: AchilleIO m => FilePath -> ByteString -> m ()
- writeFileLazy :: AchilleIO m => FilePath -> ByteString -> m ()
- doesFileExist :: AchilleIO m => FilePath -> m Bool
- doesDirExist :: AchilleIO m => FilePath -> m Bool
- callCommand :: AchilleIO m => String -> m ()
- log :: AchilleIO m => String -> m ()
- glob :: AchilleIO m => FilePath -> Pattern -> m [FilePath]
- getModificationTime :: AchilleIO m => FilePath -> m UTCTime
- fail :: MonadFail m => String -> m a
Documentation
class (Monad m, MonadFail m) => AchilleIO m Source #
Interface for IO actions used by core recipes.
readFile, readFileLazy, copyFile, writeFile, writeFileLazy, doesFileExist, doesDirExist, callCommand, log, glob, getModificationTime
Instances
AchilleIO IO Source # | |
Defined in Achille.Internal.IO readFile :: FilePath -> IO ByteString Source # readFileLazy :: FilePath -> IO ByteString Source # copyFile :: FilePath -> FilePath -> IO () Source # writeFile :: FilePath -> ByteString -> IO () Source # writeFileLazy :: FilePath -> ByteString -> IO () Source # doesFileExist :: FilePath -> IO Bool Source # doesDirExist :: FilePath -> IO Bool Source # callCommand :: String -> IO () Source # log :: String -> IO () Source # |
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.
writeFileLazy :: AchilleIO m => FilePath -> ByteString -> m () Source #
Write a lazy bytestring to a file.
callCommand :: AchilleIO m => String -> m () Source #
Run a shell command in a new process.
Find all paths matching a given globpattern, relative to a given directory.