Data.Streaming.Filesystem

streaming-commons-0.1.15.5: Common lower-level functions needed by various streaming data libraries

Safe Haskell | Safe
Language | Haskell98

Data.Streaming.Filesystem

Description

Streaming functions for interacting with the filesystem.

Synopsis

- data DirStream :: *
- openDirStream :: FilePath -> IO DirStream
- readDirStream :: DirStream -> IO (Maybe FilePath)
- closeDirStream :: DirStream -> IO ()
- data FileType
  - = FTFile
  - | FTFileSym
  - | FTDirectory
  - | FTDirectorySym
  - | FTOther
- getFileType :: FilePath -> IO FileType

# Documentation

data DirStream :: *

openDirStream :: FilePath -> IO DirStream

`openDirStream dir` calls `opendir` to obtain a directory stream for `dir`.

readDirStream :: DirStream -> IO (Maybe FilePath)

closeDirStream :: DirStream -> IO ()

`closeDirStream dp` calls `closedir` to close the directory stream `dp`.

data FileType

Constructors

FTFile |
FTFileSym | symlink to file
FTDirectory |
FTDirectorySym | symlink to a directory
FTOther |

Instances

Eq FileType |
Ord FileType |
Read FileType |
Show FileType |

getFileType :: FilePath -> IO FileType