SGI::FAMPerl interface to SGI/Irix File Access Monitor | |
Download |
SGI::FAM Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Jesse N. Glick
- Publisher web site:
- http://search.cpan.org/~jglick/
SGI::FAM Tags
SGI::FAM Description
Perl interface to SGI/Irix File Access Monitor SGI::FAM is a Perl module that provides a somewhat higher-level and friendlier interface to the SGI/Irix File Access Monitor API. This allows one to monitor both local and remote (NFS-mounted) files and directories for common filesystem events. To do so, you must register "monitors" on specified pathnames and wait for events to arrive pertaining to them. To get a full description of the API, you should see fam(3x).Since FAM only deals with absolute pathnames, all paths are canonicalized internally and monitors are held on canonical paths. Whenever a path is returned from this module, howvever, via which or monitored with no arguments, the originally specified path is given for convenience.SYNOPSIS use SGI::FAM; my $fam=new SGI::FAM; $fam->monitor('/foo'); $fam->monitor('/foo/bar.txt'); while (1) { my $event=$fam->next_event; # Blocks print "Pathname: ", $event->filename, " Event: ", $event->type, "\n"; }Asynchronous mode: while ($fam->pending) { my $event=$fam->next_event; # Immediate ... } # Do something else Requirements: · Perl
SGI::FAM Related Software