\n";
foreach($files as $file) {
$path = $dir . "/" . $file;
if (is_dir($path) && strpos($path, 'layout') === false) {
echo str_repeat(' ', $depth) . " \n";
if (file_exists($path . "/index.php")) {
echo str_repeat(' ', $depth) . " " . $file . "\n";
} else {
echo str_repeat(' ', $depth) . " " . $file . "\n";
}
createTree($path, $base_dir, $depth + 2);
echo str_repeat(' ', $depth) . " \n";
} else {
if(strpos($path, 'layout') === false && $file!="default.php" && $file!="count.txt" && $file != "index.php"){
echo str_repeat(' ', $depth) . " \n";
echo str_repeat(' ', $depth) . " ".$file."\n";
echo str_repeat(' ', $depth) . " \n";
}
}
}
echo str_repeat(' ', $depth) . "\n";
}
}
createTree(__DIR__, getcwd());
?>