NAME

AnyEvent::Inotify::EventReceiver - interface of event-receiving classes

METHODS

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.

Note: "file" below means "file or directory" where that makes sense.

handle_create

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.

handle_access($file)

Called when $file is accessed. IN_ACCESS.

handle_modify($file)

Called when $file is modified. IN_MODIFY.

handle_attribute_change($file)

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.

handle_open($file)

Called when something opens $file. IN_OPEN.

handle_close($file)

Called when something closes $file. IN_CLOSE_WRITE and IN_CLOSE_NOWRITE.

handle_close_write($file)

IN_CLOSE_WRITE only. By default, just calls handle_close, but you can override this method and handle it separately.

handle_close_nowrite($file)

IN_CLOSE_NOWRITE only. By default, just calls handle_close, but you can override this method and handle it separately.

handle_move($from, $to)

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.)

handle_delete($file)

Called when $file is deleted. IN_DELETE. (Never called for IN_DELETE_SELF, however.)