Andres Kievsky > Win32-FileSystem-Watcher-0.1.0 > Win32::FileSystem::Watcher

Download:
FSWatcher/Win32-FileSystem-Watcher-0.1.0.tar.gz

Dependencies

Annotate this POD (1)

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.1.0   Source  

NAME ^

Win32::FileSystem::Watcher - Watch a Win32 file system for changes (asynchronously).

SYNOPSIS ^

    use Win32::FileSystem::Watcher;
    
    my $watcher = Win32::FileSystem::Watcher->new( "c:\\" );

    # or

    my $watcher = Win32::FileSystem::Watcher->new(
        "c:\\",
        notify_filter  => FILE_NOTIFY_ALL,
        watch_sub_tree => 1,
    );

    $watcher->start();
    print "Monitoring started.";

    sleep(5);

    # Get a list of changes since start().
    my @entries = $watcher->get_results();

    # Get a list of changes since the last get_results()
    @entries = $watcher->get_results();

    # ... repeat as needed ...
    
    $watcher->stop(); # or undef $watcher

    foreach my $entry (@entries) {
        print $entry->action_name . " " . $entry->file_name . "\n";
    }

    # Restart monitoring
    
    # $watcher->start();
    # ...
    # $watcher->stop();

DESCRIPTION ^

TODO

SUBROUTINES/METHODS ^

TODO

DIAGNOSTICS ^

TODO

DEPENDENCIES ^

Win32::API Win32::MMF

BUGS AND LIMITATIONS ^

There are no known bugs in this module. Please report problems to Andres N. Kievsky (ank@ank.com.ar) Patches are welcome.

AUTHOR ^

Andres N. Kievsky (ank@ank.com.ar)

LICENCE AND COPYRIGHT ^

Copyright (c) 2008 Andres N. Kievsky (ank@ank.com.ar). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

syntax highlighting: