filesystem-enumerator-0.1.1: Enumerator-based API for manipulating the filesystem.

Portabilityportable
Maintainerjmillikin@gmail.com
Safe HaskellSafe-Infered

Filesystem.Enumerator

Description

Enumerator-based API for manipulating the filesystem.

Synopsis

Documentation

traverseSource

Arguments

:: MonadIO m 
=> Bool

Follow directory symlinks (only used on POSIX platforms)

-> FilePath

Root directory

-> Enumerator FilePath m a 

Starting at some root directory, traverse the filesystem and enumerate every file (or symlink to a file) found.

Note: the option of whether to follow symlinks is currently only checked on POSIX platforms, as the Win32 package does not support querying symlink status. On Windows, symlinks will always be followed.

enumDirectory :: FilePath -> Enumerator FilePath IO aSource

Enumerate entries in a directory. Entries are returned with their full path. Entries are read from the directory handle as needed, so this is safe to use with very large directories.