SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-File-Monitor rpm build for : OpenSuSE. For other distributions click perl-File-Monitor.

Name : perl-File-Monitor
Version : 1.00 Vendor : obs://build_opensuse_org/home:bjoern_beutel
Release : 150600.2.1 Date : 2024-08-28 19:01:45
Group : Development/Libraries/Perl Source RPM : perl-File-Monitor-1.00-150600.2.1.src.rpm
Size : 0.08 MB
Packager : https://www_suse_com/
Summary : Monitor files and directories for changes
Description :
This module provides a simple interface for monitoring one or more files or
directories and reporting any changes that are made to them.

It can

* * monitor existing files for changes to any of the attributes
returned by the \'stat\' function

* * monitor files that don\'t yet exist and notify you if they
are created

* * notify when a monitored file is deleted

* * notify when files are added or removed from a directory

Some possible applications include

* * monitoring the configuration file(s) of a long running process
so they can be automatically re-read if they change

* * implementing a \'drop box\' directory that receives files to be
processed in some way

* * automatically rebuilding a cached object that depends on a
number of files if any of those files changes

In order to monitor a single file create a new monitor object:

my $monitor = File::Monitor->new();

Add the file to it:

$monitor->watch( \'somefile.txt\' );

And then call \'scan\' periodically to check for changes:

my AATTchanges = $monitor->scan;

The first call to \'scan\' will never report any changes; it captures a
snapshot of the state of all monitored files and directories so that
subsequent calls to \'scan\' can report any changes.

Note that \'File::Monitor\' doesn\'t provide asynchronous notifications of
file changes; you have to call \'scan\' to learn if there have been any
changes.

To monitor multiple files call \'watch\' for each of them:

for my $file ( AATTfiles ) {
$monitor->watch( $file );
}

If there have been any changes \'scan\' will return a list of
File::Monitor::Delta objects.

my AATTchanges = $monitor->scan;
for my $change (AATTchanges) {
warn $change->name, \" has changed\
\";
}

Consult the documentation for File::Monitor::Delta for more information.

If you prefer you may register callbacks to be triggered when changes
occur.


$monitor->callback( sub {
my ($file_name, $event, $change) = AATT_;
warn \"$file_name has changed\
\";
} );


$monitor->callback( size => sub {
my ($file_name, $event, $change) = AATT_;
warn \"$file_name has changed size\
\";
} );

See File::Monitor::Delta for more information about the various event types
for which callbacks may be registered.

You may register callbacks for a specific file or directory.


$monitor->watch( \'server.conf\', sub {
my ($file_name, $event, $change) = AATT_;
warn \"Config file $file_name has changed\
\";
} );


$monitor->watch( {
name => \'server.conf\',
callback => {
uid => sub {
my ($file_name, $event, $change) = AATT_;
warn \"$file_name has changed owner\
\";
}
}
} );

This last example shows the canonical way of specifying the arguments to
\'watch\' as a hash reference. See \'watch\' for more details.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/home:/bjoern_beutel:/Aareon/SLES_15.6/noarch

Content of RPM  Provides Requires

Download
ftp.icm.edu.pl  perl-File-Monitor-1.00-150600.2.1.noarch.rpm
     

Provides :
perl(File::Monitor)
perl(File::Monitor::Base)
perl(File::Monitor::Delta)
perl(File::Monitor::Object)
perl-File-Monitor

Requires :
perl(:MODULE_COMPAT_5.26.1)
perl(version)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.26.1/File
/usr/lib/perl5/vendor_perl/5.26.1/File/Monitor
/usr/lib/perl5/vendor_perl/5.26.1/File/Monitor.pm
/usr/lib/perl5/vendor_perl/5.26.1/File/Monitor/Base.pm
/usr/lib/perl5/vendor_perl/5.26.1/File/Monitor/Delta.pm
/usr/lib/perl5/vendor_perl/5.26.1/File/Monitor/Object.pm
/usr/share/doc/packages/perl-File-Monitor
/usr/share/doc/packages/perl-File-Monitor/Changes
/usr/share/doc/packages/perl-File-Monitor/README
/usr/share/doc/packages/perl-File-Monitor/TODO
/usr/share/doc/packages/perl-File-Monitor/examples
/usr/share/doc/packages/perl-File-Monitor/examples/monitor.pl
/usr/share/man/man3/File::Monitor.3pm.gz
/usr/share/man/man3/File::Monitor::Base.3pm.gz
/usr/share/man/man3/File::Monitor::Delta.3pm.gz
/usr/share/man/man3/File::Monitor::Object.3pm.gz

 
ICM