find-conduit-0.2.0: 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

matchAll :: Monad m => Predicate m aSource

Return all entries. This is the same as sourceDirectoryDeep, except that the FileStatus structure for each entry is also provided. As a result, only one stat call is ever made per entry, compared to two per directory in the current version of sourceDirectoryDeep.

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).

regexMatcherSource

Arguments

:: (Monad m, HasFileInfo e) 
=> (FilePath -> FilePath)

Function that specifies which part of the pathname to match against. Use this to match against only filenames, or to relativize the path against the search root before comparing.

-> Text

The regular expression search pattern.

-> Predicate m e 

The regexMatcher predicate builder matches some part of every path against a given regex. Use the simpler regex if you just want to apply a regex to every file name.

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 => Looped m a a -> Looped m a aSource

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 => Looped m a a -> Looped m a aSource