Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65824 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42377 invoked from network); 14 Feb 2013 14:30:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2013 14:30:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.51 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.212.51 mail-vb0-f51.google.com Received: from [209.85.212.51] ([209.85.212.51:65211] helo=mail-vb0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/F8-13268-015FC115 for ; Thu, 14 Feb 2013 09:30:44 -0500 Received: by mail-vb0-f51.google.com with SMTP id fq11so1461015vbb.38 for ; Thu, 14 Feb 2013 06:30:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=LaY0/WDV+Gry0h1zOuky/Mff/eJ2q1wGbvLVnBaj0+8=; b=h3DkV6LRQV2FX0oZ5fC4K70Jm4dkfHsqXakaVDeL46oqc2Libh6MdYPDn2pAbcm7lk t+3YcozQBEXUj3/PvVHSN2AAE61Qcc5JQGVakp1Y+q3HuXyrGmSud6iCEf7X5XrGaysX mHbmeLUEwso4O0RBujNsQc3iIN7livopIR50dGB/PTiG81YbgKqob2dStfU9EytuOgm/ Y1nmOv9iG2JD93+kiQ5Kou2GJLeDvlTYIU+ZiuCnQBLb7Wo6MGZKpn0AUj8r7UpHcvZQ zMpovAK5tITC/yOxpXNN5AHr5N2vsmNzlJ64RjBA5z91O/zMSp0c8oaCGR00h9dB3SUx IZeQ== X-Received: by 10.221.10.72 with SMTP id oz8mr35798522vcb.36.1360852235163; Thu, 14 Feb 2013 06:30:35 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.140.132 with HTTP; Thu, 14 Feb 2013 06:29:55 -0800 (PST) In-Reply-To: <511CEEB1.7040303@hoa-project.net> References: <511CEEB1.7040303@hoa-project.net> Date: Thu, 14 Feb 2013 15:29:55 +0100 X-Google-Sender-Auth: S0FZXy17BPFX-fbiqMqTqz0sK-I Message-ID: To: ivan.enderlin@hoa-project.net Cc: PHP internals Content-Type: multipart/alternative; boundary=bcaec54d4bde1198e304d5b01a7b Subject: Re: [PHP-DEV] File system watcher/monitoring From: jpauli@php.net (Julien Pauli) --bcaec54d4bde1198e304d5b01a7b Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 fo= r > 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 =97and sudo=97, no C extension > needed), on FreeBSD, we have FAM, and on Windows, we have FileSystemWatch= er > 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 ever= y > 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 allow= s > 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. Julien --bcaec54d4bde1198e304d5b01a7b--