Win32::FileNotify - Monitor file changes
use Win32::FileNotify; my $file = './test.txt'; my $notify = Win32::FileNotify->new( $file ); $notify->wait; print $file, " wurde veraendert\n";
This is a wrapper around Win32::ChangeNotify. With Win32::FileNotify you can monitor one specific file and you get notified when the file has changed.
my $filename = '/path/to/file.txt'; $notify = Win32::FileNotify->new( $filename );
creates a new object for the given file.
$notify->wait;
See Win32::IPC
Win32::ChangeNotify
Renee Baecker, <module@renee-baecker.de>
Copyright (C) 2007 - 2008 by Renee Baecker
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.
To install Win32::FileNotify, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::FileNotify
CPAN shell
perl -MCPAN -e shell install Win32::FileNotify
For more information on module installation, please visit the detailed CPAN module installation guide.