HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduleunix-2.8.8.0Haskell2010

System.Posix.Directory.ByteString

String-based POSIX directory support

Contents
  1. Creating and removing directories
  2. Reading directories
  3. The working directory
Synopsis
  • Packageunix-2.8.8.0
  • Exports14
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceByteString.hsc

Creating and removing directories

Reading directories

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.

The working directory