Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36659 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7375 invoked from network); 28 Mar 2008 17:50:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Mar 2008 17:50:35 -0000 X-Host-Fingerprint: 24.247.219.180 24-247-219-180.dhcp.cdwr.mi.charter.com Received: from [24.247.219.180] ([24.247.219.180:9734] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/A4-25926-9EF2DE74 for ; Fri, 28 Mar 2008 12:50:34 -0500 Message-ID: To: internals@lists.php.net Date: Fri, 28 Mar 2008 13:50:28 -0500 User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 References: <1206719555.6331.39.camel@localhost> <07.8D.25926.CD81DE74@pb1.pair.com> <1206723693.6331.48.camel@localhost> In-Reply-To: <1206723693.6331.48.camel@localhost> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Posted-By: 24.247.219.180 Subject: Re: [PHP-DEV] phar API From: auroraeosrose@gmail.com (Elizabeth M Smith) >> The only things I see missing are an addFile and addDirectory shortcut >> methods for when I don't want to mess with all the metadata or creating >> iterators. > > addDirectory() is called createDirectory() in my RFC, just ignore the > return value. What would you like addFile() to do? Adding an empty file? > > cu, Lars Not add an empty directory - just add a directory and its contents much like the Phar::create would do - an assumption that you want everything in that directory inside with no iterators or magic required. addFile(filename) would just add a file - no thinking required, although if there was an addDirectory you wouldn't really need it. I'm just of the opinion that the less I have to write for common actions the better. $phar = new Phar('/path/to/phar'); if($phar->isWriteable()) { $phar->addDirectory('/path/to/some/stuff'); } done ;) Thanks, Elizabeth