IO-Lambda-Inotify

 view release on metacpan or  search on metacpan

lib/IO/Lambda/Inotify.pm  view on Meta::CPAN


=head2 inotify ([ $inotify ], $path, $flags [, $timeout ]) :: () -> ( $event, $error )

C<inotify> creates and returns a lambda, that registers a watcher on $path using
$flags ( see Linux manpage for inotify ). On success, the lambda returns $event objects
of type Linux::Inotify2::Event (exactly as Linux::Inotify2 does), on failure, $event is undefined,
and $error is set.

If $timeout is specified, and expired, $error is set to C<'timeout'>

If no $inotify object is passed, then it is created automatically, and stays alive until
the end of the program. It is also reused for other such calls.

=head2 inotify_server( $inotify, ... ) :: () -> ()

Accepts one or more $inotify objects, creates a lambda that serves as a proxy for Linux::Inotify2
event loop. Use only when programming style compatible with Linux::Inotify2 is needed.

=head1 SEE ALSO

L<IO::Lambda>, L<Linux::Inotify2>



( run in 0.782 second using v1.01-cache-2.11-cpan-39bf76dae61 )