Mac::FSEvents::Event - Object representing a filesystem event


Mac-FSEvents documentation Contained in the Mac-FSEvents distribution.

Index


Code Index:

NAME

Top

Mac::FSEvents::Event - Object representing a filesystem event

SYNOPSIS

Top

  printf "Event %d received on path %s\n", $event->id, event->path;

DESCRIPTION

Top

All events that occur are represented as Mac::FSEevents::Event objects.

METHODS

Top

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.

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.

AUTHOR

Top

Andy Grundman, <andy@hybridized.org>

COPYRIGHT AND LICENSE

Top


Mac-FSEvents documentation Contained in the Mac-FSEvents distribution.

package Mac::FSEvents::Event;

use strict;

sub id                { shift->{id} }
sub flags             { shift->{flags} }
sub path              { shift->{path} }
sub must_scan_subdirs { shift->{must_scan_subdirs} }
sub user_dropped      { shift->{user_dropped} }
sub kernel_dropped    { shift->{kernel_dropped} }
sub history_done      { shift->{history_done} }
sub mount             { shift->{mount} }
sub unmount           { shift->{unmount} }

1;
__END__