AnyEvent::Inotify::EventReceiver - interface of event-receiving classes
Event receivers must implement these methods. All files and directories passed to these methods are actually Path::Class objects. The paths provided are always relative to the directory that was given to the constructor of the AnyEvent::Inotify::Simple object.
AnyEvent::Inotify::Simple
Note: "file" below means "file or directory" where that makes sense.
Called when a new file, $file, appears in the watched directory. If it's a directory, we automatically start watching it and calling callbacks for files in that directory, still relative to the original directory. IN_CREATE.
$file
IN_CREATE
Called when $file is accessed. IN_ACCESS.
IN_ACCESS
Called when $file is modified. IN_MODIFY.
IN_MODIFY
Called when metadata like permissions, timestamps, extended attributes, link count (since Linux 2.6.25), UID, GID, and so on, changes on $file. IN_ATTRIB.
IN_ATTRIB
Called when something opens $file. IN_OPEN.
IN_OPEN
Called when something closes $file. IN_CLOSE_WRITE and IN_CLOSE_NOWRITE.
IN_CLOSE_WRITE
IN_CLOSE_NOWRITE
IN_CLOSE_WRITE only. By default, just calls handle_close, but you can override this method and handle it separately.
handle_close
IN_CLOSE_NOWRITE only. By default, just calls handle_close, but you can override this method and handle it separately.
Called when $from is moved to $to. (This does not map to a single inotify event; we wait for both the IN_MOVED_FROM and IN_MOVED_TO events, and call this when we have both.)
$from
$to
IN_MOVED_FROM
IN_MOVED_TO
Called when $file is deleted. IN_DELETE. (Never called for IN_DELETE_SELF, however.)
IN_DELETE
IN_DELETE_SELF
To install AnyEvent::Inotify::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::Inotify::Simple
CPAN shell
perl -MCPAN -e shell install AnyEvent::Inotify::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.