25 $this->files = scandir(
$path);
36 $this->folderlist = array();
37 $this->
findFiles($dir, $this->folderlist);
49 $files = scandir($dir);
53 foreach($files as $val)
56 if($val ==
'.' || $val ==
'..')
60 if(is_dir($dir.
'/'.$val))
63 $dir_array[$dir][] = $val;
69 $dir_array[$dir][] = $val;
85 $cdir = scandir($dir);
86 foreach ($cdir as $key => $value)
88 if (!in_array($value,array(
".",
"..")))
90 if (is_dir($dir . DIRECTORY_SEPARATOR . $value))
92 $result[$value] = dirToArray($dir . DIRECTORY_SEPARATOR . $value);
111 public function arrayToHtml($style,$folderStyle=null,$ftypes=null,$dot=null)
116 while(
sizeof($this->files)>
$i)
118 if(($dot==
false)||($dot==null))
120 if(stristr($this->files[
$i],$ftypes)!=
false)
123 if(($this->files[$i]!=
'.')&&($this->files[$i]!=
'..'))
125 $this->out.=$style[0].$this->files[$i++].$style[1];
135 if(($this->files[$i]!=
'.')&&($this->files[$i]!=
'..'))
137 $this->out.=$folderStyle[0].$this->files[$i++].$folderStyle[1];
147 if(is_file($this->files[
$i]))
149 $this->out.=$style[0].$this->files[$i++].$style[1];
153 $this->out.=$folderStyle[0].$this->files[$i++].$folderStyle[1];
findFiles($dir, &$dir_array)
arrayToHtml($style, $folderStyle=null, $ftypes=null, $dot=null)