File::Monitor::Lite

Monitor file changes
Download

File::Monitor::Lite Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • dryman
  • Publisher web site:
  • http://search.cpan.org/~dryman/

File::Monitor::Lite Tags


File::Monitor::Lite Description

Monitor file changes File::Monitor::Lite is another implementation of File::Monitor. While File::Monitor cannot detect file creation (unless you declare file name first),Developer commentsI use File::Find::Rule to rescan files every time when $monitor->check() is executed. To use this module, just follow synopsis above.Currently one cannot change file observing rules. To do so, create another monitor object with new rules. $m1=File::Monitor::Lite->new( name => '*.html', in => '.', ); $m1->check(); #blah... $m2=File::Monitor::Lite->new( name => '*.css', in => '.', ); $m2->check(); #blah...SYNOPSIS use File::Monitor::Lite; my $monitor = File::Monitor::Lite->new ( in => '.', name => '*.html', ); while ($monitor->check() and sleep 1){ my @deleted_files = $monitor->deleted; my @modified_files = $monitor->modified; my @created_files = $monitor->created; my @observing_files = $monitor->observed; `do blah..` if $monitor->anychange; } Requirements: · Perl


File::Monitor::Lite Related Software