HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulestreamly-core-0.3.1Haskell2010

Streamly.Internal.FileSystem.Posix.ReadDir

  • 1 type
  • 12 values
valuereadScanWith
  1. :: Scanl m (Path, CString, Ptr CDirent) a
  2. -> ReadOptions -> ReadOptions
  3. -> Path
  4. -> Stream m a
#

Read with essential metadata. The scan takes the parent dir, the child name, the child metadata and produces an output. The scan can do filtering, formatting of the output, colorizing the output etc.

The options are to ignore errors encountered when reading a path, turn the errors into a nil stream instead.

This function may not traverse all the directories supplied and it may traverse the directories recursively. Left contains those directories that were not traversed by this function, these my be the directories that were supplied as input as well as newly discovered directories during traversal. To traverse the entire tree we have to iterate this function on the Left output.

Right is a buffer containing directories and files separated by newlines.