Login   Register  
PHP Classes
elePHPant
Icontem

File: example4.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Colin McKinnon  >  pfpFileTree  >  example4.php  >  Download  
File: example4.php
Role: Example script
Content type: text/plain
Description: example
Class: pfpFileTree
Manipulates files in directories recursively
Author: By
Last change:
Date: 3 years ago
Size: 481 bytes
 

Contents

Class file image Download
<?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();