| Copyright | (c) Lennart Kolmodin 2006-2012 |
|---|---|
| License | BSD3 |
| Maintainer | kolmodin@gmail.com |
| Stability | experimental |
| Portability | hc portable, linux only |
| Safe Haskell | Safe |
| Language | Haskell98 |
System.INotify
Description
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
killINotify :: INotify -> IO () Source
withINotify :: (INotify -> IO a) -> IO a Source
addWatch :: INotify -> [EventVariety] -> ByteString -> (Event -> IO ()) -> IO WatchDescriptor Source
removeWatch :: WatchDescriptor -> IO () Source
data WatchDescriptor Source
Instances
Constructors
| Accessed | A file was accessed. |
Fields | |
| Modified | A file was modified. |
Fields | |
| Attributes | A files attributes where changed. |
Fields | |
| Closed | A file was closed. |
Fields
| |
| Opened | A file was opened. |
Fields | |
| MovedOut | A file was moved away from the watched dir. |
Fields
| |
| MovedIn | A file was moved into the watched dir. |
Fields
| |
| MovedSelf | The watched file was moved. |
Fields
| |
| Created | A file was created. |
Fields
| |
| Deleted | A file was deleted. |
Fields
| |
| DeletedSelf | The file watched was deleted. |
| Unmounted | The file watched was unmounted. |
| QOverflow | The queue overflowed. |
| Ignored | |
| Unknown FDEvent | |