Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65827 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47808 invoked from network); 14 Feb 2013 14:41:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2013 14:41:13 -0000 Authentication-Results: pb1.pair.com header.from=krebs.seb@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=krebs.seb@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.172 as permitted sender) X-PHP-List-Original-Sender: krebs.seb@gmail.com X-Host-Fingerprint: 209.85.212.172 mail-wi0-f172.google.com Received: from [209.85.212.172] ([209.85.212.172:35430] helo=mail-wi0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 13/3A-13268-887FC115 for ; Thu, 14 Feb 2013 09:41:13 -0500 Received: by mail-wi0-f172.google.com with SMTP id ez12so7134446wid.5 for ; Thu, 14 Feb 2013 06:41:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=g4yF9FKQVZs/+As/EZofVPLwT4wKmPo3SgG+jQ/+5jM=; b=AAd50INDJwRuHhSgg4fF38Y5/nvEab16SsvHBEfV77pItMv7PqE05UyKAEFVb3UfTY 2CvAtDOi+LI71vGKxLd7vm4PlQTxiexbuZ3gWvGytDUe8mJpui93uXZrI1+O8GG+cvlk DffjYNM3ADyvrnmxzwnCrOsM6He1RWfmdcyPU3U0CMcV4nbWb/F1nXO0+eibKI+Qe9fl T2CP3zXGXCzKLiBHTBDBDTwGEjs+OcZdi8uqDt83YDjq4oNd4Ln3yrN6TTxl76B4oXCB OBmkMeSXYBtL7pMaueFY4D9sDr/+SZtMjQDuMbjTstW5FsGS+z4KJEEp2rOKCKi+TMIj PmcQ== X-Received: by 10.180.76.84 with SMTP id i20mr17773038wiw.9.1360852870259; Thu, 14 Feb 2013 06:41:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.217.50.137 with HTTP; Thu, 14 Feb 2013 06:40:48 -0800 (PST) In-Reply-To: <511CF6D2.5050108@hoa-project.net> References: <511CEEB1.7040303@hoa-project.net> <511CF6D2.5050108@hoa-project.net> Date: Thu, 14 Feb 2013 15:40:48 +0100 Message-ID: To: "ivan.enderlin@hoa-project.net" Cc: PHP internals list Content-Type: multipart/alternative; boundary=f46d0434c0aaec650f04d5b03fd2 Subject: Re: [PHP-DEV] File system watcher/monitoring From: krebs.seb@gmail.com (Sebastian Krebs) --f46d0434c0aaec650f04d5b03fd2 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 2013/2/14 Ivan Enderlin @ Hoa > Hello Julien, > > > On 14/02/13 15:29, Julien Pauli wrote: > >> On Thu, Feb 14, 2013 at 3:03 PM, Ivan Enderlin @ Hoa < >> ivan.enderlin@hoa-project.net> 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 throu= gh >>> 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 extensi= on >>> 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 (thank= s >>> 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 :-). >>> >> >> Hello :-) >> >> I don't see why we would have such a thing into PHP Core. >> We are already smooth about the file system accesses with a realpath >> cache, >> and users may use different pecl ext if they want to take hand on a lib >> such as inotify. >> > Well ok, forget PHP core, but an extension would be great. At least for inotify there is an extension, which works quite fine. Never searched something similar for other OSs. Regards, Sebastian > > > -- > 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/ > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 github.com/KingCrunch --f46d0434c0aaec650f04d5b03fd2--