| Copyright | © 2020 Julian Ospald |
|---|---|
| License | BSD3 |
| Maintainer | Julian Ospald <hasufell@posteo.de> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Streamly.External.Posix.DirStream
Contents
Description
This module provides high-level file streaming API, working with directory streams (POSIX).
Synopsis
- unfoldDirContents :: MonadIO m => Unfold m DirStream (DirType, RawFilePath)
- dirContentsStream :: (MonadCatch m, MonadAsync m, MonadMask m) => DirStream -> SerialT m (DirType, RawFilePath)
- dirContents :: (MonadCatch m, MonadAsync m, MonadMask m) => DirStream -> m [(DirType, RawFilePath)]
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.