diff options
author | 2012-06-21 01:05:37 -0400 | |
---|---|---|
committer | 2012-06-21 01:05:37 -0400 | |
commit | 019d0735052d2688dc0bdeb6ba51c46b77303aaf (patch) | |
tree | 38ba3d3e4e251db1e757e1ce5cac38135e172bf9 /Utility/Types/DirWatcher.hs | |
parent | c70c036707815d6be1919116c58acecaa6d3c1a7 (diff) | |
parent | 7db83a1b0ff49ddbc316556d416ce67418428d13 (diff) |
Merge branch 'watch'
Diffstat (limited to 'Utility/Types/DirWatcher.hs')
-rw-r--r-- | Utility/Types/DirWatcher.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Utility/Types/DirWatcher.hs b/Utility/Types/DirWatcher.hs new file mode 100644 index 000000000..c828a0593 --- /dev/null +++ b/Utility/Types/DirWatcher.hs @@ -0,0 +1,22 @@ +{- generic directory watching types + - + - Copyright 2012 Joey Hess <joey@kitenet.net> + - + - Licensed under the GNU GPL version 3 or higher. + -} + +{-# LANGUAGE CPP #-} + +module Utility.Types.DirWatcher where + +import Common + +type Hook a = Maybe (a -> Maybe FileStatus -> IO ()) + +data WatchHooks = WatchHooks + { addHook :: Hook FilePath + , addSymlinkHook :: Hook FilePath + , delHook :: Hook FilePath + , delDirHook :: Hook FilePath + , errHook :: Hook String -- error message + } |