File: README

package info (click to toggle)
libfilesys-notify-simple-perl 0.13-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 128 kB
  • sloc: perl: 191; makefile: 2
file content (60 lines) | stat: -rw-r--r-- 1,872 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
NAME

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

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.

      * There is no file name based filter. Do it in your own code.

      * You can not get types of events (created, updated, deleted).

      * 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.

      * 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.

      * 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