Safe Haskell | None |
---|---|
Language | Haskell98 |
- data EventType
- data Event = Event {}
- eventType :: Lens' Event EventType
- eventPath :: Lens' Event FilePath
- eventTime :: Lens' Event POSIXTime
- data Watcher a = Watcher {
- watcherDirs :: MVar (Map FilePath (Bool, IO ()))
- watcherMan :: WatchManager
- watcherChan :: Chan (a, Event)
- withWatcher :: (Watcher a -> IO b) -> IO b
- watchDir :: Watcher a -> FilePath -> (Event -> Bool) -> a -> IO ()
- watchDir_ :: Watcher () -> FilePath -> (Event -> Bool) -> IO ()
- unwatchDir :: Watcher a -> FilePath -> IO Bool
- isWatchingDir :: Watcher a -> FilePath -> IO Bool
- watchTree :: Watcher a -> FilePath -> (Event -> Bool) -> a -> IO ()
- watchTree_ :: Watcher () -> FilePath -> (Event -> Bool) -> IO ()
- unwatchTree :: Watcher a -> FilePath -> IO Bool
- isWatchingTree :: Watcher a -> FilePath -> IO Bool
- readEvent :: Watcher a -> IO (a, Event)
- eventGroup :: Watcher a -> NominalDiffTime -> ([(a, Event)] -> IO ()) -> IO ()
- onEvents :: Watcher a -> NominalDiffTime -> ([(a, Event)] -> IO ()) -> IO ()
- onEvents_ :: Watcher a -> ([(a, Event)] -> IO ()) -> IO ()
Documentation
Event type
Event
Directories watcher
Watcher | |
|
unwatchDir :: Watcher a -> FilePath -> IO Bool Source #
Unwatch directory, return False
, if not watched
Working with events
eventGroup :: Watcher a -> NominalDiffTime -> ([(a, Event)] -> IO ()) -> IO () Source #
Get event group