<?php
/**
* example4.php
*
* delivers the same functionality as example3
* but by decorating the readTreeStat method
*/
require_once('pfpFileTree.inc.php');
class extFileTree extends pfpFileTree
{
function readTreeStat($filename)
{
$attrs=parent::readTreeStat($filename);
$attrs['mimetype']=mime_content_type($file);
return $attrs;
}
}
$src='/var/www/html';
$t=new extFileTree($src);
$t->readTree(array('size'=>'>10000','mimetype'=>'!text/html'));
$t->ls();
|