summaryrefslogtreecommitdiff
path: root/Utility/DirWatcher
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-10 22:24:13 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-10 22:24:13 -0400
commitaecc1edcdd80c41f04e30c3e4749b3b301cd928d (patch)
tree6f00c02bf3414660b1aa53ebe476616b9b631e44 /Utility/DirWatcher
parentfd403af92c538dc4da22accc1c7c02a588dde6ef (diff)
let's put type modules under the parent module, not in a Types directory
Diffstat (limited to 'Utility/DirWatcher')
-rw-r--r--Utility/DirWatcher/Types.hs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Utility/DirWatcher/Types.hs b/Utility/DirWatcher/Types.hs
new file mode 100644
index 000000000..8cfa69d34
--- /dev/null
+++ b/Utility/DirWatcher/Types.hs
@@ -0,0 +1,24 @@
+{- generic directory watching types
+ -
+ - Copyright 2012 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+module Utility.DirWatcher.Types 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
+ , modifyHook :: Hook FilePath
+ }
+
+mkWatchHooks :: WatchHooks
+mkWatchHooks = WatchHooks Nothing Nothing Nothing Nothing Nothing Nothing