streaming-commons-0.1.17: 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 # |
Methods (==) :: FileType -> FileType -> Bool # (/=) :: FileType -> FileType -> Bool #
Ord FileType # |
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 #
Read FileType # |
Methods readsPrec :: Int -> ReadS FileType # readList :: ReadS [FileType] # readPrec :: ReadPrec FileType # readListPrec :: ReadPrec [FileType] #
Show FileType # |
Methods showsPrec :: Int -> FileType -> ShowS # show :: FileType -> String # showList :: [FileType] -> ShowS #

getFileType :: FilePath -> IO FileType #