Safe Haskell | Safe |
---|---|
Language | Haskell98 |
System.KQueue.HighLevel
Description
This module contains higher-level abstraction for monitoring file system changes, built on top of the bindings from System.KQueue.
Documentation
watchFile :: FilePath -> (EventType -> IO ()) -> IO Watcher
Watch a file for changes. The file doesn't have to exist, but the
directory it is in, does. Returns immediately. You can stop
watching by passing the Watcher
to stopWatching
.
stopWatching :: Watcher -> IO ()
Stop a watcher from watching.
data EventType
The type of file change that occurred.
data Watcher
An identifier for the watcher of a file. Allows you to stop watching it later.