fs-utils-0.1: FileSystem utils
Safe HaskellNone
LanguageGHC2021

FileSystem.IO

Description

Provides common file IO actions in terms of OsPath.

Since: 0.1

Synopsis

File handling

withBinaryFileIO :: OsPath -> IOMode -> (Handle -> IO a) -> IO a Source #

Since: 0.1

Errors

throwPathIOError Source #

Arguments

:: (HasCallStack, MonadThrow m) 
=> OsPath

Path upon which the IO operation failed.

-> String

String location (e.g. function name).

-> IOErrorType

Type of exception.

-> String

Description.

-> m a 

Helper for throwing IOException.

Since: 0.1

throwFilePathIOError Source #

Arguments

:: (HasCallStack, MonadThrow m) 
=> FilePath

Path upon which the IO operation failed.

-> String

String location (e.g. function name).

-> IOErrorType

Type of exception.

-> String

Description.

-> m a 

Helper for throwing IOException with legacy FilePath.

Since: 0.1