Copyright | Copyright (C) 2020 Daniel Firth |
---|---|
Maintainer | Daniel Firth <dan.firth@homotopic.tech |
Safe Haskell | None |
Language | Haskell2010 |
License : MIT Stability : experimental
File utilities in Development.Shake lifted to MonadAction
and
FileLike
/DirLike
.
Synopsis
- copyFile :: (MonadAction m, FileLike b a, FileLike b' a', Partial) => a -> a' -> m ()
- copyFile' :: (MonadAction m, FileLike b a, Partial) => a -> a -> m ()
- copyFileChanged :: (MonadAction m, FileLike b a, FileLike b' a', Partial) => a -> a' -> m ()
- copyFileChanged' :: (MonadAction m, FileLike b a, Partial) => a -> a -> m ()
- readFile' :: (MonadAction m, FileLike b a, Partial) => a -> m Text
- readFileLines :: (MonadAction m, FileLike b a, Partial) => a -> m [Text]
- readFileIn' :: (MonadAction m, DirLike b d, FileLike Rel a, Partial) => d -> a -> m Text
- writeFile' :: (MonadAction m, FileLike b a, Partial) => a -> Text -> m ()
- writeFileLines :: (MonadAction m, FileLike b a, Partial) => a -> [Text] -> m ()
- writeFileIn' :: (MonadAction m, DirLike b d, FileLike Rel a, Partial) => d -> a -> Text -> m ()
- writeFileChanged :: (MonadAction m, FileLike b a, Partial) => a -> Text -> m ()
- writeFileChangedIn :: (MonadAction m, DirLike b d, FileLike Rel a, Partial) => d -> a -> Text -> m ()
- removeFiles :: (MonadAction m, DirLike b d) => d -> [FilePattern] -> m ()
- removeFilesAfter :: (MonadAction m, DirLike b d) => d -> [FilePattern] -> m ()
- class PathLike b File a => FileLike b a where
- class PathLike b Dir a => DirLike b a where
- (/>) :: (DirLike b a, FileLike Rel c) => a -> c -> Path b File
Documentation
copyFileChanged :: (MonadAction m, FileLike b a, FileLike b' a', Partial) => a -> a' -> m () Source #
Lifted version of copyFileChanged'
that copies between two FileLike
.
copyFileChanged' :: (MonadAction m, FileLike b a, Partial) => a -> a -> m () Source #
Like copyFileChanged
but ensures the FileLike
s are of the same type, useful for type inference.
readFileLines :: (MonadAction m, FileLike b a, Partial) => a -> m [Text] Source #
Lifted version of readFileLines
that reads any FileLike
.
readFileIn' :: (MonadAction m, DirLike b d, FileLike Rel a, Partial) => d -> a -> m Text Source #
Like readFile'
, but with an argument for the parent directory. Used for symmetry with
the way getDirectoryFiles
takes arguments.
writeFile' :: (MonadAction m, FileLike b a, Partial) => a -> Text -> m () Source #
writeFileLines :: (MonadAction m, FileLike b a, Partial) => a -> [Text] -> m () Source #
Lifted version of writeFileLines
that writes to any FileLike
.
writeFileIn' :: (MonadAction m, DirLike b d, FileLike Rel a, Partial) => d -> a -> Text -> m () Source #
Like writeFile'
, but with an argument for the parent directory. Used for symmetry with
the way getDirectoryFiles
takes arguments.
writeFileChanged :: (MonadAction m, FileLike b a, Partial) => a -> Text -> m () Source #
Lifted version of writeFileChanged
that writes to any FileLike
.
writeFileChangedIn :: (MonadAction m, DirLike b d, FileLike Rel a, Partial) => d -> a -> Text -> m () Source #
Like writeFileChanged'
, but with an argument for the parent directory. Used for symmetry with
the way getDirectoryFiles
takes arguments.
removeFiles :: (MonadAction m, DirLike b d) => d -> [FilePattern] -> m () Source #
Lifted version of removeFiles
that accepts any DirLike
.
removeFilesAfter :: (MonadAction m, DirLike b d) => d -> [FilePattern] -> m () Source #
Lifted version of removeFilesAfter
that accepts any DirLike
..
class PathLike b File a => FileLike b a where #
Class representing a type a
that can be compiled down to a `Path b File`.
Nothing