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)
- events :: Watcher a -> IO [(a, Event)]
- onEvent :: Watcher a -> (a -> Event -> IO ()) -> IO ()
Documentation
Event type
Directories watcher
Watcher | |
|
withWatcher :: (Watcher a -> IO b) -> IO b Source
Create watcher
unwatchDir :: Watcher a -> FilePath -> IO Bool Source
Unwatch directory, return False
, if not watched