Loading...

Streamly.Internal.FileSystem.Posix.ReadDir

Documentation

newtype DirStream Source #

Constructors

DirStream (Ptr CDir) 

openDirStreamCString :: CString -> IO DirStream Source #

The CString must be pinned.

closeDirStream :: DirStream -> IO () Source #

closeDirStream dp calls closedir to close the directory stream dp.

readEitherByteChunks :: MonadIO m => [PosixPath] -> Stream m (Either [PosixPath] (Array Word8)) Source #

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

eitherReader :: (MonadIO m, MonadCatch m) => Unfold m Path (Either Path Path) Source #

Read directories as Left and files as Right. Filter out "." and ".." entries.

Internal