diff options
Diffstat (limited to 'Inotify.dcl')
-rw-r--r-- | Inotify.dcl | 118 |
1 files changed, 26 insertions, 92 deletions
diff --git a/Inotify.dcl b/Inotify.dcl index 0fa983d..e6893e2 100644 --- a/Inotify.dcl +++ b/Inotify.dcl @@ -14,19 +14,13 @@ from Data.Maybe import ::Maybe */ :: *Inotify st -/** - * An inotify watch descriptor - */ +//* An inotify watch descriptor :: INWatch -/** - * An inotify event mask - */ +//* An inotify event mask :: INMask :== Int -/** - * An inotify event - */ +//* An inotify event :: INEvent :== Int /** @@ -36,9 +30,7 @@ from Data.Maybe import ::Maybe */ :: INCallback st :== INEvent (Maybe String) st *World -> *(st, *World) -/** - * Bitwise OR for event masks - */ +//* Bitwise OR for event masks (|-) infixl 6 :: (INMask INMask -> INMask) /** @@ -126,125 +118,67 @@ inotify_loop_forever :: !*(Inotify st) !*World -> *(!*Inotify st, !*World) /*** Begin inotify.h ***/ -/** - * Inotify event mask: file was accessed - */ +//* Inotify event mask: file was accessed IN_ACCESS :== 0x00000001 - -/** - * Inotify event mask: file was modified - */ +//* Inotify event mask: file was modified IN_MODIFY :== 0x00000002 - -/** - * Inotify event mask: metadata changed - */ +//* Inotify event mask: metadata changed IN_ATTRIB :== 0x00000004 - -/** - * Inotify event mask: file opened for writing was closed - */ +//* Inotify event mask: file opened for writing was closed IN_CLOSE_WRITE :== 0x00000008 - -/** - * Inotify event mask: file not opened for writing was closed - */ +//* Inotify event mask: file not opened for writing was closed IN_CLOSE_NOWRITE :== 0x00000010 - -/** - * Inotify event mask: file was opened - */ +//* Inotify event mask: file was opened IN_OPEN :== 0x00000020 - -/** - * Inotify event mask: file was moved from watched directory - */ +//* Inotify event mask: file was moved from watched directory IN_MOVED_FROM :== 0x00000040 - -/** - * Inotify event mask: file was moved to watched directory - */ +//* Inotify event mask: file was moved to watched directory IN_MOVED_TO :== 0x00000080 - -/** - * Inotify event mask: file was created in watched directory - */ +//* Inotify event mask: file was created in watched directory IN_CREATE :== 0x00000100 - -/** - * Inotify event mask: file in watched directory was deleted - */ +//* Inotify event mask: file in watched directory was deleted IN_DELETE :== 0x00000200 - -/** - * Inotify event mask: watched file was deleted - */ +//* Inotify event mask: watched file was deleted IN_DELETE_SELF :== 0x00000400 - -/** - * Inotify event mask: watched file was moved - */ +//* Inotify event mask: watched file was moved IN_MOVE_SELF :== 0x00000800 - -/** - * Inotify event mask: backing fs of watched file was unmounted - */ +//* Inotify event mask: backing fs of watched file was unmounted IN_UNMOUNT :== 0x00002000 - -/** - * Inotify event mask: the inotify event queue overflowed - */ +//* Inotify event mask: the inotify event queue overflowed IN_Q_OVERFLOW :== 0x00004000 - /** * Inotify event mask: the watch has been removed, either through * inotify_rm_watch or because it was deleted, the fs was unmounted, etc. */ IN_IGNORED :== 0x00008000 - /** * Inotify event mask: watched file was closed + * @type Int */ IN_CLOSE :== (IN_CLOSE_WRITE |- IN_CLOSE_NOWRITE) - /** * Inotify event mask: a file was moved from or to a watched directory + * @type Int */ IN_MOVE :== (IN_MOVED_FROM |- IN_MOVED_TO) - -/** - * Inotify event mask: only watch the path if it is a directory - */ +//* Inotify event mask: only watch the path if it is a directory IN_ONLYDIR :== 0x01000000 - -/** - * Inotify event mask: don't follow symlinks - */ +//* Inotify event mask: don't follow symlinks IN_DONT_FOLLOW :== 0x02000000 - -/** - * Inotify event mask: stop watching files when they get unlinked - */ +//* Inotify event mask: stop watching files when they get unlinked IN_EXCL_UNLINK :== 0x04000000 - /** * Inotify event mask: when adding a watch on a path for which a watch already * exists, OR the new event mask with the old one instead of replacing it. */ IN_MASK_ADD :== 0x20000000 - -/** - * Inotify event mask: the event occurred against a directory - */ +//* Inotify event mask: the event occurred against a directory IN_ISDIR :== 0x40000000 - -/** - * Inotify event mask: monitor a watch only for one event, then remove it - */ +//* Inotify event mask: monitor a watch only for one event, then remove it IN_ONESHOT :== 0x80000000 - /** * Inotify event mask: OR of all events + * @type Int */ IN_ALL_EVENTS :== (IN_ACCESS |- IN_MODIFY |- IN_ATTRIB |- IN_CLOSE_WRITE |- IN_CLOSE_NOWRITE |