library/Garp/File/Storage/Local.php
public function getList(): array {
        $list = array();
        $dir = $this->_docRoot . $this->_path;
        if (is_dir($dir)) {
            if ($dh = opendir($dir)) {
                while (($file = readdir($dh)) !== false) {
                    if (substr($file, 0, 1) !== '.'
                        && strpos($file, '.') !== false
                    ) {
                        $list[] = $file;
                    }
                }
                closedir($dh);
            }
        } else {
            throw new Exception($dir . ' is not a directory.');
        }

        return $list;
    }
public function getList(): array {
        $list = array();
        $dir = $this->_docRoot . $this->_path;
        if (is_dir($dir)) {
            if ($dh = opendir($dir)) {
                while (($file = readdir($dh)) !== false) {
                    if (substr($file, 0, 1) !== '.'
                        && strpos($file, '.') !== false
                    ) {
                        $list[] = $file;
                    }
                }
                closedir($dh);
            }
        } else {
            throw new Exception($dir . ' is not a directory.');
        }

        return $list;
    }
public function getList ( ) : array { $ list = array ( ) ; $ dir = $ this -> _docRoot . $ this -> _path ; if ( is_dir ( $ dir ) ) { if ( $ dh = opendir ( $ dir ) ) { while ( ( $ file = readdir ( $ dh ) ) !== false ) { if ( substr ( $ file , 0 , 1 ) !== '.' && strpos ( $ file , '.' ) !== false ) { $ list [ ] = $ file ; } } closedir ( $ dh ) ; } } else { throw new Exception ( $ dir . ' is not a directory.' ) ; } return $ list ; }
Lists all valid files in the upload directory.

@return array
Lists all valid files in the upload directory .