On 02/14/2013 03:03 PM, Ivan Enderlin @ Hoa wrote:
Hi internal,
A missing feature in PHP is a file system watcher/monitoring available
for almost all platforms. On Linux, we have inotify (available in PHP
through pecl/inotify), on Mac OS X, we have /dev/fsevents (not
available in PHP, since we need ioctl to do that in pure PHP —and
sudo—, no C extension needed), on FreeBSD, we have FAM, and on
Windows, we have FileSystemWatcher in .NET. All major platforms have a
solution ready to use.
By now, if we didn't use these solutions, we should use a finder
(thanks to RecursiveIteratorIterator and DirectoryIterator in SPL)
that runs every n seconds and compute a diff with the previous run.
This solution works fine for a small set of files but it can slow for
a big one. This is just a tricky solution, not a proper one.
Possible domains where it is needed: test, CI, log, file transfering,
security etc.
Is it possible to have such a feature landing in PHP (core if karma
allows it)? or do you want such a feature?
Best regards :-).
Ivan,
Everzet has started to build a client side solution[1]
Hopefuly he will have time to update the PR with what is remaining to do
soon[2]
[1] https://github.com/symfony/symfony/pull/4605
[2] https://twitter.com/everzet/status/302381248620408832
Cheers,
Victor
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php