File::ChangeNotify::Event - Class for file change events


File-ChangeNotify documentation Contained in the File-ChangeNotify distribution.

Index


Code Index:

NAME

Top

File::ChangeNotify::Event - Class for file change events

VERSION

Top

version 0.20

SYNOPSIS

Top

    for my $event ( $watcher->new_events() )
    {
        print $event->path(), ' - ', $event->type(), "\n";
    }

DESCRIPTION

Top

This class provides information about a change to a specific file or directory.

METHODS

Top

File::ChangeNotify::Event->new(...)

This method creates a new event. It accepts the following arguments:

* path => $path

The full path to the file or directory that changed.

* type => $type

The type of event. This must be one of "create", "modify", "delete", or "unknown".

$event->path()

Returns the path of the changed file or directory.

$event->type()

Returns the type of event.

AUTHOR

Top

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE

Top


File-ChangeNotify documentation Contained in the File-ChangeNotify distribution.

package File::ChangeNotify::Event;
BEGIN {
  $File::ChangeNotify::Event::VERSION = '0.20';
}

use strict;
use warnings;
use namespace::autoclean;

use Moose;
use Moose::Util::TypeConstraints;

has path => (
    is       => 'ro',
    isa      => 'Str',
    required => 1,
);

has type => (
    is       => 'ro',
    isa      => enum( [qw( create modify delete unknown )] ),
    required => 1,
);

__PACKAGE__->meta()->make_immutable();

1;

# ABSTRACT: Class for file change events




__END__