>> 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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php