Filesys...::Simple(3)
Okay bestie, welcome to the Filesys::Notify::Simple page from the User Contributed Perl Documentation ๐
โ youโll find it filed under Filesys...::Simple(3), and itโs literally a simple and dumb file system watcher. Letโs get into it โจ
๐ธ NAME ๐ธ
Filesys::Notify::Simple โ a simple and dumb file system watcher ๐
โจ SYNOPSIS โจ
Hereโs the whole vibe, copied exactly so you can steal it:
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 ๐ฆ
So 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 โ thatโs the official escape hatch ๐ซถ
- There is no file name based filter โ do it in your own code, bestie.
- You can not get types of events (
created,updated,deleted). - Currently the
waitmethod blocks.
In return, this module doesnโt depend on any non-core modules โ periodt ๐
Platform specific optimizations with Linux::Inotify2, Mac::FSEvents, Filesys::Notify::KQueue and Win32::ChangeNotify are truely optional. Like, for real optional โจ
NOTE: Using Win32::ChangeNotify may put additional limitations.
Win32::ChangeNotifyusesFindFirstChangeNotificationAso that Unicode characters can not be handled. On cygwin (1.7 or later), Unicode characters should be able to be handled whenWin32::ChangeNotifyis not used.- If more than 64 directories are included under the specified paths, an error occurrs.
๐ซถ AUTHOR ๐ซถ
The icon behind this module is 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 ๐
Go give these a little look if youโre feeling nosy ๐
File::ChangeNotifyMac::FSEventsLinux::Inotify2Filesys::Notify::KQueueWin32::ChangeNotify
Later, bestie! ๐ This page is from the Filesys...::Simple(3) manual, with perl v5.42.0, dated 2020-01-04 โจ
๐ฆ where this page comes from
- opensuse-leap 16.0: perl-Filesys-Notify-Simple 0.14-bp160.1.12 ยท Artistic-1.0 OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms