streamly-posix-0.1.0.1: Posix related streaming APIs

Copyright© 2020 Julian Ospald
LicenseBSD3
MaintainerJulian Ospald <hasufell@posteo.de>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Streamly.External.Posix.DirStream

Contents

Description

This module provides high-level file streaming API, working with directory streams (POSIX).

Synopsis

Directory listing

unfoldDirContents :: MonadIO m => Unfold m DirStream (DirType, RawFilePath) Source #

Create an Unfold of directory contents.

dirContentsStream :: (MonadCatch m, MonadAsync m, MonadMask m) => DirStream -> SerialT m (DirType, RawFilePath) Source #

Read the directory contents as a stream.

The DirStream is closed automatically, when the streamly stream exits normally, aborts or gets garbage collected. The stream must not be used after the dirstream is closed.

dirContents :: (MonadCatch m, MonadAsync m, MonadMask m) => DirStream -> m [(DirType, RawFilePath)] Source #

Read the directory contents strictly as a list.

The DirStream is closed automatically.