rendered paste body<?php/*@ Author 'Alex'@ File : file_tree.php created 30/05/2007*/class file_tree { # Configuration of system var $buffer; var $not_countable = array(".",".."); var $path = "."; function file_tree($path) { $this->buffer = "Starting file dumper of ".$path; $this->path = $path; $this->construct_tree($this->path); } function construct_tree($path) { $this->handle = opendir($this->path) or die("error #1"); $this->buffer .= "<br> Directory: ".$this->path; while(false !== ($this->file = readdir($this->handle))) { if(!in_array($this->file,$this->not_countable)) { if(is_file($this->file)) { echo($this->file."<br>"); } elseif(is_dir($this->file)) { # $this->construct_tree($this->file); } } } closedir($this->handle); } }$ins = new file_tree("./");?>