The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

GX::File::Watcher - Filesystem watcher

SYNOPSIS

None.

DESCRIPTION

This module provides the GX::File::Watcher class which extends the GX::Class::Object class.

METHODS

Constructor

new

Returns a new GX::File::Watcher object.

    $watcher = GX::File::Watcher->new;
Returns:
Exceptions:

Public Methods

directories

Returns the monitored directory paths.

    @directories = $watcher->directories;
Returns:
  • @directories ( strings )

files

Returns the monitored file paths.

    @files = $watcher->files;
Returns:
  • @files ( strings )

find_changes

Checks the monitored files and directories for changes. When called in list context, find_changes() returns a list with the paths to the modified (or deleted) files and directories.

    @paths = $watcher->find_changes;
Returns:
  • @paths ( strings )

Exceptions:

In scalar context, find_changes() returns true if at least one of the monitored files and directories has been modified (or deleted), otherwise false.

    $result = $watcher->find_changes;
Returns:
  • $result ( bool )

Exceptions:

watch

Adds the given file / directory paths to the watchlist.

    $watcher->watch( @paths );
Arguments:
  • @paths ( strings )

Exceptions:

AUTHOR

Jörg A. Uzarek <uzarek@runlevelnull.de>

COPYRIGHT AND LICENSE

Copyright (c) 2009-2011 Jörg A. Uzarek.

This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.