| Safe Haskell | None |
|---|
SimpleH.File
Contents
- module System.FilePath
- module SimpleH
- data File
- getFile :: FilePath -> IO File
- showFile :: File -> String
- _file :: Traversal' File (Maybe String, Maybe ByteString)
- _directory :: Traversal' File [(String, File)]
- getCurrentDirectory :: IO FilePath
Exported modules
module System.FilePath
module SimpleH
The File interface
_directory :: Traversal' File [(String, File)]Source
getCurrentDirectory :: IO FilePath
If the operating system has a notion of current directories,
getCurrentDirectory returns an absolute path to the
current directory of the calling process.
The operation may fail with:
-
HardwareFaultA physical I/O error has occurred.[EIO] -
isDoesNotExistError/NoSuchThingThere is no path referring to the current directory.[EPERM, ENOENT, ESTALE...] -
isPermissionError/PermissionDeniedThe process has insufficient privileges to perform the operation.[EACCES] -
ResourceExhaustedInsufficient resources are available to perform the operation. -
UnsupportedOperationThe operating system has no notion of current directory.
Note that in a concurrent program, the current directory is global
state shared between all threads of the process. When using
filesystem operations from multiple threads, it is therefore highly
recommended to use absolute rather than relative FilePaths.