find-conduit-0.2.2: A file-finding conduit that allows user control over traversals.

Safe HaskellNone

Data.Conduit.Find

Synopsis

Documentation

data FileEntry Source

Constructors

FileEntry 

Fields

entryInfo :: FileInfo
 
entryStatus :: FileStatus
 

type Predicate m a = Looped m a aSource

class HasFileInfo a whereSource

Methods

getFileInfo :: a -> FileInfoSource

consider :: a -> Looped m a b -> Looped m a bSource

ignoreAll :: Monad m => Looped m a bSource

ignoreVcs :: (MonadIO m, HasFileInfo e) => Predicate m eSource

Return all entries, except for those within version-control metadata directories (and not including the version control directory itself either).

regex :: (Monad m, HasFileInfo e) => Text -> Predicate m eSource

Find every entry whose filename part matching the given regular expression.

glob :: (Monad m, HasFileInfo e) => Text -> Predicate m eSource

Find every entry whose filename part matching the given filename globbing expression. For example: glob *.hs.

stat :: MonadIO m => Looped m FileInfo FileEntrySource

lstat :: MonadIO m => Looped m FileInfo FileEntrySource

depth :: (Monad m, HasFileInfo e) => (Int -> Bool) -> Predicate m eSource

prune :: MonadIO m => Predicate m a -> Predicate m aSource

prune is much like not_, but does not preserve recursion.

test :: MonadIO m => Predicate m FileEntry -> FilePath -> m BoolSource

Test a file path using the same type of Predicate that is accepted by find.

or_ :: MonadIO m => Looped m a b -> Looped m a b -> Looped m a bSource

and_ :: MonadIO m => Looped m a b -> Looped m a b -> Looped m a bSource

not_ :: MonadIO m => Predicate m a -> Predicate m aSource

not_ reverse the meaning of the given predicate, preserving recursion.