| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Distribution.Compat.Directory
Synopsis
- listDirectory :: FilePath -> IO [FilePath]
- makeAbsolute :: FilePath -> IO FilePath
Documentation
listDirectory :: FilePath -> IO [FilePath] Source #
returns a list of all entries in dir without
the special entries (listDirectory dir. and ..).
The operation may fail with:
HardwareFaultA physical I/O error has occurred.[EIO]InvalidArgumentThe operand is not a valid directory name.[ENAMETOOLONG, ELOOP]isDoesNotExistError/NoSuchThingThe directory does not exist.[ENOENT, ENOTDIR]isPermissionError/PermissionDeniedThe process has insufficient privileges to perform the operation.[EACCES]ResourceExhaustedInsufficient resources are available to perform the operation.[EMFILE, ENFILE]InappropriateTypeThe path refers to an existing non-directory object.[ENOTDIR]
Since: directory-1.2.5.0
makeAbsolute :: FilePath -> IO FilePath Source #
Convert a path into an absolute path. If the given path is relative, the
current directory is prepended and then the combined result is
normalised. If the path is already absolute, the path is simply
normalised. The function preserves the presence or absence of the
trailing path separator unless the path refers to the root directory /.
If the path is already absolute, the operation never fails. Otherwise, the
operation may fail with the same exceptions as getCurrentDirectory.
Since: directory-1.2.2.0