… | |
… | |
8 | |
8 | |
9 | =head1 DESCRIPTION |
9 | =head1 DESCRIPTION |
10 | |
10 | |
11 | =head2 The Linux::Inotify2 Class |
11 | =head2 The Linux::Inotify2 Class |
12 | |
12 | |
13 | This module implements an interface to the linux inotify file/directory |
13 | This module implements an interface to the Linux 2.6.13 and later Inotify |
14 | change notification sytem. |
14 | file/directory change notification sytem. |
15 | |
15 | |
16 | It has a number of advantages over the Linux::Inotfy module: |
16 | It has a number of advantages over the Linux::Inotify module: |
17 | |
17 | |
18 | - it is portable (Linux::Inotify only works on x86) |
18 | - it is portable (Linux::Inotify only works on x86) |
19 | - the equivalent of fullname works correctly |
19 | - the equivalent of fullname works correctly |
20 | - it is better documented |
20 | - it is better documented |
21 | - it has callback-style interface, which is better suited for |
21 | - it has callback-style interface, which is better suited for |
… | |
… | |
31 | use Scalar::Util (); |
31 | use Scalar::Util (); |
32 | |
32 | |
33 | use base 'Exporter'; |
33 | use base 'Exporter'; |
34 | |
34 | |
35 | BEGIN { |
35 | BEGIN { |
36 | $VERSION = 0.1; |
36 | $VERSION = 0.2; |
37 | |
37 | |
38 | @constants = qw( |
38 | @constants = qw( |
39 | IN_ACCESS IN_MODIFY IN_ATTRIB IN_CLOSE_WRITE |
39 | IN_ACCESS IN_MODIFY IN_ATTRIB IN_CLOSE_WRITE |
40 | IN_CLOSE_NOWRITE IN_OPEN IN_MOVED_FROM IN_MOVED_TO |
40 | IN_CLOSE_NOWRITE IN_OPEN IN_MOVED_FROM IN_MOVED_TO |
41 | IN_CREATE IN_DELETE IN_DELETE_SELF |
41 | IN_CREATE IN_DELETE IN_DELETE_SELF |
… | |
… | |
83 | following constants (all exported by default) ORed together: |
83 | following constants (all exported by default) ORed together: |
84 | |
84 | |
85 | IN_ACCESS File was accessed |
85 | IN_ACCESS File was accessed |
86 | IN_MODIFY File was modified |
86 | IN_MODIFY File was modified |
87 | IN_ATTRIB Metadata changed |
87 | IN_ATTRIB Metadata changed |
88 | IN_CLOSE_WRITE Writtable file was closed |
88 | IN_CLOSE_WRITE Writable file was closed |
89 | IN_CLOSE_NOWRITE Unwrittable file closed |
89 | IN_CLOSE_NOWRITE Unwritable file closed |
90 | IN_OPEN File was opened |
90 | IN_OPEN File was opened |
91 | IN_MOVED_FROM File was moved from X |
91 | IN_MOVED_FROM File was moved from X |
92 | IN_MOVED_TO File was moved to Y |
92 | IN_MOVED_TO File was moved to Y |
93 | IN_CREATE Subfile was created |
93 | IN_CREATE Subfile was created |
94 | IN_DELETE Subfile was deleted |
94 | IN_DELETE Subfile was deleted |