Data.Streaming.Filesystem

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

Safe Haskell | Safe-Inferred
Language | Haskell2010

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

Instances details

Read FileType # |
Instance details Defined in Data.Streaming.Filesystem Methods readsPrec :: Int -> ReadS FileType # readList :: ReadS [FileType] # readPrec :: ReadPrec FileType # readListPrec :: ReadPrec [FileType] #
Show FileType # |
Instance details Defined in Data.Streaming.Filesystem Methods showsPrec :: Int -> FileType -> ShowS # show :: FileType -> String # showList :: [FileType] -> ShowS #
Eq FileType # |
Instance details Defined in Data.Streaming.Filesystem Methods (==) :: FileType -> FileType -> Bool # (/=) :: FileType -> FileType -> Bool #
Ord FileType # |
Instance details Defined in Data.Streaming.Filesystem Methods compare :: FileType -> FileType -> Ordering # (<) :: FileType -> FileType -> Bool # (<=) :: FileType -> FileType -> Bool # (>) :: FileType -> FileType -> Bool # (>=) :: FileType -> FileType -> Bool # max :: FileType -> FileType -> FileType # min :: FileType -> FileType -> FileType #

getFileType :: FilePath -> IO FileType #