Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65821 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35646 invoked from network); 14 Feb 2013 14:03:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2013 14:03:37 -0000 Authentication-Results: pb1.pair.com header.from=ivan.enderlin@hoa-project.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ivan.enderlin@hoa-project.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hoa-project.net from 95.130.12.24 cause and error) X-PHP-List-Original-Sender: ivan.enderlin@hoa-project.net X-Host-Fingerprint: 95.130.12.24 host1.trois-doubles.net Linux 2.6 Received: from [95.130.12.24] ([95.130.12.24:56226] helo=host1.trois-doubles.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E1/A7-13268-5BEEC115 for ; Thu, 14 Feb 2013 09:03:35 -0500 Received: from Hwhost2.local (unknown [194.57.88.213]) by host1.trois-doubles.net (Postfix) with ESMTPSA id CC21520ADB6 for ; Thu, 14 Feb 2013 15:03:29 +0100 (CET) Message-ID: <511CEEB1.7040303@hoa-project.net> Date: Thu, 14 Feb 2013 15:03:29 +0100 Reply-To: ivan.enderlin@hoa-project.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Thunderbird/20.0a2 MIME-Version: 1.0 To: PHP internals Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: File system watcher/monitoring From: ivan.enderlin@hoa-project.net ("Ivan Enderlin @ Hoa") Hi internal, A missing feature in PHP is a file system watcher/monitoring available=20 for almost all platforms. On Linux, we have inotify (available in PHP=20 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 =97and sudo=97, no C=20 extension needed), on FreeBSD, we have FAM, and on Windows, we have=20 FileSystemWatcher in .NET. All major platforms have a solution ready to u= se. By now, if we didn't use these solutions, we should use a finder (thanks = to RecursiveIteratorIterator and DirectoryIterator in SPL) that runs=20 every n seconds and compute a diff with the previous run. This solution=20 works fine for a small set of files but it can slow for a big one. This=20 is just a tricky solution, not a proper one. Possible domains where it is needed: test, CI, log, file transfering,=20 security etc. Is it possible to have such a feature landing in PHP (core if karma=20 allows it)? or do you want such a feature? Best regards :-). --=20 Ivan Enderlin Developer of Hoa http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/