Copyright | (c) Lennart Kolmodin 2006-2012 |
---|---|
License | BSD3 |
Maintainer | kolmodin@gmail.com |
Stability | experimental |
Portability | hc portable, linux only |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A Haskell binding to INotify.
See http://www.kernel.org/pub/linux/kernel/people/rml/inotify/ and man
inotify
.
Use initINotify
to get a INotify
, then use addWatch
to
add a watch on a file or directory. Select which events you're interested
in with EventVariety
, which corresponds to the Event
events.
Use removeWatch
once you don't want to watch a file any more.
Documentation
initINotify :: IO INotify Source #
killINotify :: INotify -> IO () Source #
addWatch :: INotify -> [EventVariety] -> RawFilePath -> (Event -> IO ()) -> IO WatchDescriptor Source #
removeWatch :: WatchDescriptor -> IO () Source #
data WatchDescriptor Source #
Instances
Eq WatchDescriptor Source # | |
Defined in System.INotify (==) :: WatchDescriptor -> WatchDescriptor -> Bool # (/=) :: WatchDescriptor -> WatchDescriptor -> Bool # | |
Show WatchDescriptor Source # | |
Defined in System.INotify showsPrec :: Int -> WatchDescriptor -> ShowS # show :: WatchDescriptor -> String # showList :: [WatchDescriptor] -> ShowS # |
Accessed | A file was accessed. |
Modified | A file was modified. |
Attributes | A files attributes where changed. |
Closed | A file was closed. |
| |
Opened | A file was opened. |
MovedOut | A file was moved away from the watched dir. |
| |
MovedIn | A file was moved into the watched dir. |
| |
MovedSelf | The watched file was moved. |
| |
Created | A file was created. |
| |
Deleted | A file was deleted. |
| |
DeletedSelf | The file watched was deleted. |
Unmounted | The file watched was unmounted. |
QOverflow | The queue overflowed. |
Ignored | |
Unknown FDEvent |
data EventVariety Source #
Access | |
Modify | |
Attrib | |
Close | |
CloseWrite | |
CloseNoWrite | |
Open | |
Move | |
MoveIn | |
MoveOut | |
MoveSelf | |
Create | |
Delete | |
DeleteSelf | |
OnlyDir | |
NoSymlink | |
MaskAdd | |
OneShot | |
AllEvents |
Instances
Eq EventVariety Source # | |
Defined in System.INotify (==) :: EventVariety -> EventVariety -> Bool # (/=) :: EventVariety -> EventVariety -> Bool # |