HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleunix-2.8.7.0Haskell2010

System.Posix.Directory.ByteString

String-based POSIX directory support

  • 2 types
  • 12 values
  • Packageunix-2.8.7.0
  • Exports14
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceByteString.hsc

Creating and removing directories

2 declarations

Reading directories

9 declarations

readDirStream dp calls readdir to obtain the next directory entry (struct dirent) for the open directory stream dp, and returns the d_name member of that structure.

Note that this function returns an empty filepath if the end of the directory stream is reached. For a safer alternative use readDirStreamMaybe.

readDirStreamMaybe dp calls readdir to obtain the next directory entry (struct dirent) for the open directory stream dp. It returns the d_name member of that structure wrapped in a Just d_name if an entry was read and Nothing if the end of the directory stream was reached.

valuerewindDirStream :: DirStream -> IO ()
#

rewindDirStream dp calls rewinddir to reposition the directory stream dp at the beginning of the directory.

The working directory

3 declarations