Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Write Text
to files using UTF8 and ignoring native
line ending conventions.
Synopsis
- writeFileUtf8 :: MonadIO m => FilePath -> Text -> m ()
- readFileUtf8 :: MonadIO m => FilePath -> m Text
- getContentsUtf8 :: MonadIO m => m Text
- findClosestFileSatisfying :: MonadIO m => (FilePath -> Bool) -> FilePath -> m (Maybe FilePath)
- withIORefCache :: Ord k => IORef (Map k v) -> k -> IO v -> IO v
Documentation
writeFileUtf8 :: MonadIO m => FilePath -> Text -> m () Source #
Write a Text
to a file using UTF8 and ignoring native
line ending conventions.
readFileUtf8 :: MonadIO m => FilePath -> m Text Source #
Read an entire file strictly into a Text
using UTF8 and
ignoring native line ending conventions.
findClosestFileSatisfying Source #
:: MonadIO m | |
=> (FilePath -> Bool) | The predicate that determines what we are looking for |
-> FilePath | Path to the starting point for the search |
-> m (Maybe FilePath) | Absolute path to the found file if available |
Find the path to the closest file higher in the file hierarchy that satisfies a given predicate.