NAME
Mac::FSEvents::Event - Object representing a filesystem event
SYNOPSIS
printf "Event %d received on path %s\n", $event->id, $event->path;
DESCRIPTION
All events that occur are represented as Mac::FSEevents::Event objects.
METHODS
- id
-
The Event ID for this event. Event IDs come from a single global source and are guaranteed to always be increasing, even across system reboots or drives moving between machines. The only real use for this value is for passing as the 'since' argument to new() to resume receiving events from a particular point in time.
- flags
-
The flags associated with this event. The raw flags value is not much use, use the individual flag methods below.
- path
-
The path where the event occurred.
NOTE: Event paths are real file system paths, with all the symbolic links resolved. If you are watching a path with a symbolic link, use "abs_path" in Cwd if you need to make comparisons against the event's path.
- must_scan_subdirs
-
This flag indicates that you must rescan not just the directory in the event, but all its children, recursively. This can happen if there was a problem whereby events were coalesced hierarchically. For example, an event in /Users/jsmith/Music and an event in /Users/jsmith/Pictures might be coalesced into an event with this flag set and path=/Users/jsmith.
- user_dropped
-
This flag will be set if must_scan_subdirs is set and the bottleneck happened in the user application.
- kernel_dropped
-
This flag will be set if must_scan_subdirs is set and the bottleneck happened in the kernel.
- history_done
-
This flag indicates a special event marking the end of the "historical" events sent as a result of the 'since' parameter being specified. After sending all events, one additional event is sent with this flag set. You should ignore the path supplied in this event.
- mount
-
This flag indicates a special event sent when a volume is mounted. The path in the event is the path to the newly-mounted volume.
- unmount
-
This flag indicates a special event sent when a volume is unmounted. The path in the event is the path to the directory from which the volume was unmounted.
- root_changed
-
This flag indicates that a change occurred along the path you're monitoring. See https://developer.apple.com/library/mac/#documentation/Darwin/Reference/FSEvents_Ref/FSEvents_h/index.html#//apple_ref/c/econst/kFSEventStreamCreateFlagWatchRoot.
AUTHOR
Andy Grundman, <andy@hybridized.org>
COPYRIGHT AND LICENSE
Copyright (C) 2009 by Andy Grundman
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.