watcher-0.0.2: Opinionated filesystem watcher.

Safe HaskellNone

Watcher

Synopsis

Documentation

watch :: Handler -> FilePath -> IO WatcherSource

Creates a watch for a single handler on a single directory.

unwatch :: Watcher -> IO [Warning]Source

Shuts down all watching and the inotifier.

data Action Source

The types of actions that are reported.

Instances

data Warning Source

Badness that happened during a watch, usually due to inotify limitations.

Instances

data Watcher Source

A handler used to mutate and reference watchers.

Instances

type Handler = Action -> FilePath -> IO ()Source

Functions that handle events The filepaths passed will be joined with the path used to set up the watcher. If you have mydir/ file1 file2 And you do (watch myHandler mydir) and file1 changes, myHandler will be passed mydir/file1 as the FilePath.