1File::ChangeNotify::EveUnste(r3)Contributed Perl DocumenFtialtei:o:nChangeNotify::Event(3)
2
3
4
6 File::ChangeNotify::Event - Class for file change events
7
9 version 0.29
10
12 my $watcher = File::ChangeNotify->instantiate_watcher(
13 directories => [ '/my/path', '/my/other' ],
14 filter => qr/\.(?:pm|conf|yml)$/,
15 exclude => [ 't', 'root', qr(/(?!\.)[^/]+$) ],
16 );
17
18 for my $event ( $watcher->new_events() ) {
19 print $event->path(), ' - ', $event->type(), "\n";
20 }
21
23 This class provides information about a change to a specific file or
24 directory.
25
27 File::ChangeNotify::Event->new(...)
28 This method creates a new event. It accepts the following arguments:
29
30 · path => $path
31
32 The full path to the file or directory that changed.
33
34 · type => $type
35
36 The type of event. This must be one of "create", "modify",
37 "delete", or "unknown".
38
39 $event->path()
40 Returns the path of the changed file or directory.
41
42 $event->type()
43 Returns the type of event.
44
46 Bugs may be submitted at
47 <http://rt.cpan.org/Public/Dist/Display.html?Name=File-ChangeNotify> or
48 via email to bug-file-changenotify@rt.cpan.org <mailto:bug-file-
49 changenotify@rt.cpan.org>.
50
51 I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".
52
54 The source code repository for File-ChangeNotify can be found at
55 <https://github.com/houseabsolute/File-ChangeNotify>.
56
58 Dave Rolsky <autarch@urth.org>
59
61 This software is Copyright (c) 2009 - 2018 by Dave Rolsky.
62
63 This is free software, licensed under:
64
65 The Artistic License 2.0 (GPL Compatible)
66
67 The full text of the license can be found in the LICENSE file included
68 with this distribution.
69
70
71
72perl v5.28.0 2018-09-25 File::ChangeNotify::Event(3)