Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
the basic file io - translated for the Either or ErrorT signaling style uses the Path and Path.IO framework
Synopsis
- module Uniform.Filenames
- module Uniform.FileStatus
- module Uniform.FileIOalgebra
- module Uniform.TypedFile
- module Uniform.FileStrings
- module Uniform.Piped
- getAppUserDataDir :: MonadIO m => String -> m (Path Abs Dir)
- doesFileExist :: MonadIO m => Path b File -> m Bool
Documentation
module Uniform.Filenames
module Uniform.FileStatus
module Uniform.FileIOalgebra
module Uniform.TypedFile
module Uniform.FileStrings
module Uniform.Piped
Obtain the path to a special directory for storing user-specific application data (traditional Unix location).
The argument is usually the name of the application. Since it will be integrated into the path, it must consist of valid path characters.
- On Unix-like systems, the path is
~/.<app>
. - On Windows, the path is
%APPDATA%/<app>
(e.g.C:/Users/<user>/AppData/Roaming/<app>
)
Note: the directory may not actually exist, in which case you would need to create it. It is expected that the parent directory exists and is writable.
The operation may fail with:
UnsupportedOperation
The operating system has no notion of application-specific data directory.isDoesNotExistError
The home directory for the current user does not exist, or cannot be found.
doesFileExist :: MonadIO m => Path b File -> m Bool #
The operation doesFileExist
returns True
if the argument file
exists and is not a directory, and False
otherwise.