readdir

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Read entry from directory handle
<?php readdir(?resource $dir_handle = null): string|false
<?php     {

        assert(null !== $this->handle);



        return readdir($this->handle);

    }



    public function dir_rewinddir()
<?php     private function doTree($dir, &$array)

    {

        if ($dh = opendir($dir)) {

            while ($file = readdir($dh)) {

                if ($file !== '.' && $file !== '..') {

                    if (is_link($dir.'/'.$file)) {

                        $array[$dir][$file] = readlink($dir.'/'.$file);