hsdev-0.1.5.2: Haskell development library and tool with support of autocompletion, symbol info, go to declaration, find references etc.

Safe HaskellNone
LanguageHaskell98

System.Directory.Watcher

Contents

Synopsis

Documentation

data Event Source

Event

data Watcher a Source

Directories watcher

Constructors

Watcher 

Fields

watcherDirs :: MVar (Map FilePath (Bool, IO ()))

Map from directory to watch stopper

watcherMan :: WatchManager
 
watcherChan :: Chan (a, Event)
 

withWatcher :: (Watcher a -> IO b) -> IO b Source

Create watcher

watchDir :: Watcher a -> FilePath -> (Event -> Bool) -> a -> IO () Source

Watch directory

watchDir_ :: Watcher () -> FilePath -> (Event -> Bool) -> IO () Source

unwatchDir :: Watcher a -> FilePath -> IO Bool Source

Unwatch directory, return False, if not watched

isWatchingDir :: Watcher a -> FilePath -> IO Bool Source

Check if dir is watching

watchTree :: Watcher a -> FilePath -> (Event -> Bool) -> a -> IO () Source

Watch directory tree

watchTree_ :: Watcher () -> FilePath -> (Event -> Bool) -> IO () Source

unwatchTree :: Watcher a -> FilePath -> IO Bool Source

Unwatch directory tree

isWatchingTree :: Watcher a -> FilePath -> IO Bool Source

Check if tree is watching

Working with events

readEvent :: Watcher a -> IO (a, Event) Source

Read next event

events :: Watcher a -> IO [(a, Event)] Source

Get lazy list of events

onEvent :: Watcher a -> (a -> Event -> IO ()) -> IO () Source

Process all events