68function directory_list(
string $directory,
bool $show_hidden =
false,
int $recursion_deep = 0, array &$aList = [],
string &$ignore =
"")
70 if (is_dir($directory))
73 $dir = dir( $directory );
76 while (
false !== ($entry = $dir->read()))
79 if ($entry[0] ==
'.' && $show_hidden ===
false)
84 $temp_dir = $directory.
"/".$entry;
85 if (is_dir($temp_dir))
88 $aList[] = str_replace( $ignore,
"", $temp_dir );
89 directory_list($temp_dir, $show_hidden, $recursion_deep + 1, $aList, $ignore);
95 if ($recursion_deep == 0)
97 natcasesort( $aList );