|o||return a false value immediately without doing physical file checks if check_interval hasnt elapsed.|
|o||perform a physical test on the specified file if the number of seconds specified in check_interval have elapsed since the last physical check. If the files modification date has changed since the last physical check, it will return a true value, otherwise a false value is returned.|
The module clearly distinguishes system time from file system time. If your (e.g. NFS mounted) file system is off by a constant amount of time compared to the executing computers clock, itll just work fine.
To disable the resource-saving delay feature, just set check_interval to 0 and change_detected() will run a physical file test on every call.
If you already have the current time available, you can pass it on to change_detected() as an optional parameter, like in
which then wont trigger a call to time(), but use the value provided.
Instead of polling time and file changes, new() can be instructed to set up a signal handler. If you call the constructor like
To trigger a physical file check on the next call to change_detected() regardless if check_interval has expired or not, call
on the watcher object.
The watcher can also be used to detect files that have moved. It will not only detect if a watched file has disappeared, but also if it has been replaced by a new file in the meantime.
The parameters check_interval and signal limit the number of physical file system checks, similarily as with change_detected().
Copyright 2002-2013 by Mike Schilli <email@example.com> and Kevin Goess <firstname.lastname@example.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Please contribute patches to the project on Github:
Send bug reports or requests for enhancements to the authors via our
MAILING LIST (questions, bug reports, suggestions/patches): email@example.com
Contributors (in alphabetical order): Ateeq Altaf, Cory Bennett, Jens Berthold, Jeremy Bopp, Hutton Davidson, Chris R. Donnelly, Matisse Enzer, Hugh Esco, Anthony Foiani, James FitzGibbon, Carl Franks, Dennis Gregorovic, Andy Grundman, Paul Harrington, Alexander Hartmaier David Hull, Robert Jacobson, Jason Kohles, Jeff Macdonald, Markus Peter, Brett Rann, Peter Rabbitson, Erik Selberg, Aaron Straup Cope, Lars Thegler, David Viner, Mac Yang.
|perl v5.20.3||CONFIG::WATCH (3)||2015-04-18|