';
foreach (new DirectoryIterator($path) as $file) {
if( $file->isDot() ) {
continue;
}
if( $file->isDir() ) {
$return .= '
' . $file->getFilename() . get_list( $file->getPathname()) . '';
}
$return .= '' . $file->getFilename() . '';
}
$return .= '';
return $return;
}
echo get_list('/home/matt/sources/');