Safe Haskell | None |
---|
Wrappers around exception throwing functions and related routines
- data LayoutException
- createDirectory :: MonadIO m => FilePath -> m (Either LayoutException ())
- createFile :: MonadIO m => FilePath -> Maybe Text -> m (Either LayoutException ())
- fileExists :: MonadIO m => FilePath -> m (Either LayoutException ())
- directoryExists :: MonadIO m => FilePath -> m (Either LayoutException ())
- readFile :: MonadIO m => FilePath -> Text -> m (Either LayoutException ())
- anyfail :: MonadWriter [w] m => m (Either w a) -> m ()
- relative :: FilePath -> LayoutException -> LayoutException
Documentation
data LayoutException Source
Information about cought exceptions in various routines
CD IOErrorType FilePath |
|
CF IOErrorType FilePath |
|
FE IOErrorType FilePath |
|
DE IOErrorType FilePath |
|
RF IOErrorType FilePath Text |
|
createDirectory :: MonadIO m => FilePath -> m (Either LayoutException ())Source
IO-exceptions-free createDirectory
createFile :: MonadIO m => FilePath -> Maybe Text -> m (Either LayoutException ())Source
IO-exceptions-free writeFile
fileExists :: MonadIO m => FilePath -> m (Either LayoutException ())Source
doesFileExist
that returns Either
instead of Bool
directoryExists :: MonadIO m => FilePath -> m (Either LayoutException ())Source
doesDirectoryExist
that returns Either
instead of Bool
readFile :: MonadIO m => FilePath -> Text -> m (Either LayoutException ())Source
IO-exceptions-free readFile
anyfail :: MonadWriter [w] m => m (Either w a) -> m ()Source
Log failures
relative :: FilePath -> LayoutException -> LayoutExceptionSource
Make paths in LayoutException
relative to given FilePath