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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Moduledirectory-ospath-streaming-0.3Haskell2010

System.Directory.OsPath.Streaming.Internal

  • 1 type
  • 4 values

Returns both basename path and full path of a directory entry relative to the passed DirStream root.

For example:

readDirStreamFull =<< openDirStream [osp|.|]
Just ("./bar",Basename {unBasename = "foo"},File Regular)
readDirStreamFull =<< openDirStream [osp|foo/|]
Just ("foo/bar",Basename {unBasename = "foo"},File Regular)
readDirStreamFull =<< openDirStream [osp|/foo/foo|]
Just ("/foo/foo/bar",Basename {unBasename = "foo"},File Regular)

This allows to avoid re-creating the full path on the client side and thus reduce allocations.

valuecloseDirStream :: DirStream -> IO ()
#

Deallocate directory handle. It’s safe to close DirStream multiple times, unlike the underlying OS-specific directory stream handle.