GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  FILESYS::NOTIFY::SIMPLE (3)

.ds Aq ’

NAME

Filesys::Notify::Simple - Simple and dumb file system watcher

CONTENTS

SYNOPSIS



  use Filesys::Notify::Simple;

  my $watcher = Filesys::Notify::Simple->new([ "." ]);
  $watcher->wait(sub {
      for my $event (@_) {
          $event->{path} # full path of the file updated
      }
  });



DESCRIPTION

Filesys::Notify::Simple is a simple but unified interface to get notifications of changes to a given filesystem path. It utilizes inotify2 on Linux, fsevents on OS X, kqueue on FreeBSD and FindFirstChangeNotification on Windows if they’re installed, with a fallback to the full directory scan if they’re not available.

There are some limitations in this module. If you don’t like it, use File::ChangeNotify.
o There is no file name based filter. Do it in your own code.
o You can not get types of events (created, updated, deleted).
o Currently wait method blocks.
In return, this module doesn’t depend on any non-core modules. Platform specific optimizations with Linux::Inotify2, Mac::FSEvents, Filesys::Notify::KQueue and Win32::ChangeNotify are truely optional.

NOTE: Using Win32::ChangeNotify may put additional limitations.
o Win32::ChangeNotify uses FindFirstChangeNotificationA so that Unicode characters can not be handled. On cygwin (1.7 or later), Unicode characters should be able to be handled when Win32::ChangeNotify is not used.
o If more than 64 directories are included under the specified paths, an error occurrs.

AUTHOR

Tatsuhiko Miyagawa <miyagawa@bulknews.net>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

File::ChangeNotify Mac::FSEvents Linux::Inotify2 Filesys::Notify::KQueue Win32::ChangeNotify
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 FILESYS::NOTIFY::SIMPLE (3) 2013-06-13

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.