Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28159 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25250 invoked by uid 1010); 26 Feb 2007 19:48:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25233 invoked from network); 26 Feb 2007 19:48:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Feb 2007 19:48:47 -0000 Authentication-Results: pb1.pair.com header.from=info@adaniels.nl; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=info@adaniels.nl; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain adaniels.nl from 82.94.236.173 cause and error) X-PHP-List-Original-Sender: info@adaniels.nl X-Host-Fingerprint: 82.94.236.173 loco.helderhosting.nl Linux 2.5 (sometimes 2.4) (4) Received: from [82.94.236.173] ([82.94.236.173:50094] helo=loco.helderhosting.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/00-24960-49933E54 for ; Mon, 26 Feb 2007 14:48:39 -0500 Received: from [192.168.1.174] (a80-126-54-132.adsl.xs4all.nl [80.126.54.132]) by loco (Postfix) with ESMTP id CC9A610D868A; Mon, 26 Feb 2007 20:48:31 +0100 (CET) Message-ID: <45E33990.8030806@adaniels.nl> Date: Mon, 26 Feb 2007 20:48:32 +0100 User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 To: helly@php.net, internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: suggestion SplFileInfo From: info@adaniels.nl (Arnold Daniels) Hi, I've got a few feature suggestions for SplFileInfo and DirectoryIteratorRecursive. I'm creating yet another php file manager. I've noticed that I needed to add quite some code to make it act the way gnome nautilus does. I believe these feature would be a good addition. SplFileInfo: - Add parameter $flags to constructor. The flags are passed to any fileinfo object created. - Add flags FOLLOW_LINK_ALWAYS, FOLLOW_LINK_EXISTS, FOLLOW_LINK_NEVER for the constructor. Functions as getPerms and getOwner will look at this setting. - Add getBasename, to get the basename of either a dir or file. - Function getLinkTarget, does readlink($this->getPathname()) - Function getRealpath, does realpath($this->getPathname()) - Function getOwnerName and getGroupName - Function isHidden, to check wether a file is hidden - Functions getTypeInfo and getMime, to get info of the file using libmagic - Function setDirInfoClass, set a info class specially for directories DirectoryIteratorRecursive: - Add flag DIRS_ONLY for the constructor, to only loop through directories - Add flag WITHOUT_HIDDEN_FILES for the constructor, not to loop through hidden files - Function getFileCount If you like these features, but don't have time to implement them, I can see if I can write a patch. I'm quite new at writing PHP extensions, but I know the basics. Best regards, Arnolds