Copyright | (c) Sergey Vinokurov 2024 |
---|---|
License | Apache-2.0 (see LICENSE) |
Maintainer | serg.foo@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
System.Directory.OsPath.Streaming.Internal.Raw
Description
Streaming functions for interacting with the filesystem.
These do the basic job of reading directory entries but care must be taken to not close these streams more than once.
Synopsis
- data RawDirStream = RawDirStream !DirStream !OsPath
- openRawDirStream :: OsPath -> IO RawDirStream
- readRawDirStream :: RawDirStream -> IO (Maybe (OsPath, FileType))
- closeRawDirStream :: RawDirStream -> IO ()
- newtype DirReadCache = DirReadCache ()
- allocateDirReadCache :: IO DirReadCache
- releaseDirReadCache :: DirReadCache -> IO ()
- readRawDirStreamWithCache :: DirReadCache -> RawDirStream -> IO (Maybe (OsPath, Basename OsPath, FileType))
Documentation
data RawDirStream Source #
Abstract handle to directory contents.
Not thread safe and shouldn't be closed more than once.
Constructors
RawDirStream !DirStream !OsPath |
openRawDirStream :: OsPath -> IO RawDirStream Source #
readRawDirStream :: RawDirStream -> IO (Maybe (OsPath, FileType)) Source #
closeRawDirStream :: RawDirStream -> IO () Source #
Deallocate directory handle. It’s not safe to call multiple times on the same handle.
newtype DirReadCache Source #
Constructors
DirReadCache () |
releaseDirReadCache :: DirReadCache -> IO () Source #
readRawDirStreamWithCache :: DirReadCache -> RawDirStream -> IO (Maybe (OsPath, Basename OsPath, FileType)) Source #